From a0c41826c8ffa9f628306e9748460b4afc2c520a 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:01:05 +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 | 14 +++++++++++--- src/main/main.ts | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pyflask/manageNeuroconv/manage_neuroconv.py b/pyflask/manageNeuroconv/manage_neuroconv.py index 935a17af2..7113e8eed 100644 --- a/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/pyflask/manageNeuroconv/manage_neuroconv.py @@ -75,9 +75,15 @@ def coerce_schema_compliance_recursive(obj, schema): if key in schema.get("properties", {}): prop_schema = schema["properties"][key] if prop_schema.get("type") == "number" and value is None: - obj[key] = math.nan # Turn None into NaN if a number is expected (JavaScript JSON.stringify turns NaN into None) + obj[ + key + ] = ( + math.nan + ) # Turn None into NaN if a number is expected (JavaScript JSON.stringify turns NaN into None) elif prop_schema.get("type") == "number" and isinstance(value, int): - obj[key] = float(value) # Turn integer into float if an integer is expected (JavaScript / JSON Schema coerces floats with trailing zeros to integers) + obj[key] = float( + value + ) # Turn integer into float if an integer is expected (JavaScript / JSON Schema coerces floats with trailing zeros to integers) else: coerce_schema_compliance_recursive(value, prop_schema) elif isinstance(obj, list): @@ -86,7 +92,9 @@ def coerce_schema_compliance_recursive(obj, schema): return obj - return coerce_schema_compliance_recursive(copy.deepcopy(json_object), resolve_references(copy.deepcopy(json_schema))) + return coerce_schema_compliance_recursive( + copy.deepcopy(json_object), resolve_references(copy.deepcopy(json_schema)) + ) def locate_data(info: dict) -> dict: 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");