From 5867afc7f86bff02975dcc086a1fa48d4e01be1d Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 17 Jun 2025 16:57:44 +0200 Subject: [PATCH 1/2] don't fail if black is not installed --- plugin-template | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin-template b/plugin-template index 623f0d5a..808000c1 100755 --- a/plugin-template +++ b/plugin-template @@ -414,7 +414,10 @@ def write_template_section(config, name, plugin_root_dir, verbose=False): black_paths = filter( lambda x: os.path.exists(os.path.join(plugin_root_dir, x)), black_paths ) - subprocess.run(["black", "--quiet"] + list(black_paths), cwd=plugin_root_dir) + try: + subprocess.run(["black", "--quiet"] + list(black_paths), cwd=plugin_root_dir) + except FileNotFoundError: + pass print(f"Section: {name} \n templated: {files_templated}\n copied: {files_copied}") return 0 From a224b44e78b5141710235f967b62b6bb4aaf5066 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 17 Jun 2025 17:14:17 +0200 Subject: [PATCH 2/2] add black to requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index abcb9934..e81da93f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +black jinja2 pyyaml requests~=2.32.3