From 877a80b25abb0801b9eb1af3ab44e0ab958353ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 00:35:07 +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 | 16 ++++++---------- .../data/GuidedBackendConfiguration.js | 2 +- .../pages/guided-mode/data/GuidedStructure.js | 6 +++--- .../guided-mode/options/GuidedInspectorPage.js | 4 +--- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/pyflask/manageNeuroconv/manage_neuroconv.py b/pyflask/manageNeuroconv/manage_neuroconv.py index 84b86a4ed..d8f0393aa 100644 --- a/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/pyflask/manageNeuroconv/manage_neuroconv.py @@ -668,32 +668,28 @@ def get_interface_alignment(info: dict) -> dict: return timestamps -def configure_dataset_backends(nwbfile, backend_configuration, configuration = None): +def configure_dataset_backends(nwbfile, backend_configuration, configuration=None): from neuroconv.tools.nwb_helpers import get_default_backend_configuration, configure_backend - PROPS_TO_AVOID = [ - "full_shape" - ] + PROPS_TO_AVOID = ["full_shape"] - if (configuration is None): + if configuration is None: configuration = get_default_backend_configuration(nwbfile=nwbfile, backend="hdf5") for name, item in backend_configuration.items(): for key, value in item.items(): # Avoid setting compression options if unspecified - if (key == 'compression_options' and len(value) == 0): + if key == "compression_options" and len(value) == 0: setattr(configuration.dataset_configurations[name], key, None) # Avoid certain properties passed to the GUIDE - elif (key not in PROPS_TO_AVOID): + elif key not in PROPS_TO_AVOID: setattr(configuration.dataset_configurations[name], key, value) - configure_backend(nwbfile=nwbfile, backend_configuration=configuration) - def get_backend_configuration(info: dict) -> dict: import numpy as np @@ -719,7 +715,7 @@ def get_backend_configuration(info: dict) -> dict: if backend_configuration: configure_dataset_backends(nwbfile, backend_configuration, configuration) - + def custom_encoder(obj): if isinstance(obj, np.ndarray): return obj.tolist() diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedBackendConfiguration.js b/src/renderer/src/stories/pages/guided-mode/data/GuidedBackendConfiguration.js index 69f598a68..061571951 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedBackendConfiguration.js +++ b/src/renderer/src/stories/pages/guided-mode/data/GuidedBackendConfiguration.js @@ -60,7 +60,7 @@ export class GuidedBackendConfigurationPage extends ManagedPage { } // NOTE: Eventually you'll want to swap this to a full stub conversion with these options (which will fail the same...) - await this.getBackendConfiguration(true, { title: "Validating current backend configuration" }) // Validate by trying to set backend configuration with the latest values + await this.getBackendConfiguration(true, { title: "Validating current backend configuration" }); // Validate by trying to set backend configuration with the latest values return this.to(1); }, diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js b/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js index a763e275b..77fc7061b 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js +++ b/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js @@ -34,9 +34,9 @@ export class GuidedStructurePage extends Page { }; Object.assign(this.addButton.style, { - marginTop: '10px' - }) - + marginTop: "10px", + }); + this.addButton.innerText = "Add Format"; this.addButton.onClick = () => { this.search.shadowRoot.querySelector("input").focus(); diff --git a/src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js b/src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js index 8cd2911a0..eb73345ee 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js +++ b/src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js @@ -115,7 +115,6 @@ export class GuidedInspectorPage extends Page { return html` ${until( (async () => { - if (fileArr.length <= 1) { this.report = inspector; @@ -157,8 +156,7 @@ export class GuidedInspectorPage extends Page { messages: truncateFilePaths(result.messages, path), }; - console.log(this.report, fileArr) - + console.log(this.report, fileArr); } if (!inspector) await this.save();