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");