From 6e7cd7190b223ece69d6ffa8651eb4a28b888824 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:51:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyflask/manageNeuroconv/manage_neuroconv.py | 10 ++++++---- src/main/main.ts | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pyflask/manageNeuroconv/manage_neuroconv.py b/pyflask/manageNeuroconv/manage_neuroconv.py index ec1b7347d..912f3acb3 100644 --- a/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/pyflask/manageNeuroconv/manage_neuroconv.py @@ -559,8 +559,8 @@ def inspect_nwb_folder(payload): return json.loads(json.dumps(messages, cls=InspectorOutputJSONEncoder)) -def aggregate_symlinks_in_new_directory(paths, reason="", folder_path = None): - if (folder_path is None): +def aggregate_symlinks_in_new_directory(paths, reason="", folder_path=None): + if folder_path is None: folder_path = GUIDE_ROOT_FOLDER / ".temp" / reason / f"temp_{datetime.now().strftime('%Y%m%d-%H%M%S')}" folder_path.mkdir(parents=True) @@ -568,8 +568,10 @@ def aggregate_symlinks_in_new_directory(paths, reason="", folder_path = None): for path in paths: path = Path(path) new_path = folder_path / path.name - if (path.is_dir()): - aggregate_symlinks_in_new_directory(list(map(lambda name: os.path.join(path, name), os.listdir(path))), None, new_path) + if path.is_dir(): + aggregate_symlinks_in_new_directory( + list(map(lambda name: os.path.join(path, name), os.listdir(path))), None, new_path + ) else: new_path.symlink_to(path, path.is_dir()) diff --git a/src/main/main.ts b/src/main/main.ts index 0f78f25c1..f15f363fb 100755 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -184,7 +184,7 @@ const exitPyProc = async () => { const killAllPreviousProcesses = async () => { const fetch = globalThis.fetch - + if (fetch){ console.log("Killing all previous processes");