Skip to content

Commit ef5d1bc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7b4c587 commit ef5d1bc

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,9 @@ def on_recording_interface(name, recording_interface):
618618
if prop_name not in existing_col_names:
619619
# Infer data_type from schema type (required by update_recording_properties_from_table_as_json)
620620
schema_type = prop_info.get("type", "str")
621-
data_type = {"number": "float64", "integer": "int64", "boolean": "bool", "array": "object"}.get(schema_type, "str")
621+
data_type = {"number": "float64", "integer": "int64", "boolean": "bool", "array": "object"}.get(
622+
schema_type, "str"
623+
)
622624
existing_electrode_columns.append(
623625
{
624626
"name": prop_name,
@@ -656,7 +658,9 @@ def on_recording_interface(name, recording_interface):
656658
for prop_name, prop_info in new_units_properties.items():
657659
if prop_name not in existing_col_names:
658660
schema_type = prop_info.get("type", "str")
659-
data_type = {"number": "float64", "integer": "int64", "boolean": "bool", "array": "object"}.get(schema_type, "str")
661+
data_type = {"number": "float64", "integer": "int64", "boolean": "bool", "array": "object"}.get(
662+
schema_type, "str"
663+
)
660664
existing_unit_columns.append(
661665
{
662666
"name": prop_name,
@@ -1390,19 +1394,23 @@ def _ensure_dandi_staging_alias():
13901394
the get_instance function to bypass the rejection.
13911395
"""
13921396
from dandi.consts import known_instances
1397+
13931398
if "dandi-staging" not in known_instances and "dandi-sandbox" in known_instances:
13941399
known_instances["dandi-staging"] = known_instances["dandi-sandbox"]
13951400

13961401
# Patch get_instance to not raise ValueError for dandi-staging
13971402
try:
13981403
import dandi.utils as _dandi_utils
1399-
_original_get_instance = getattr(_dandi_utils, '_original_get_instance_fn', None)
1400-
if _original_get_instance is None and hasattr(_dandi_utils, 'get_instance'):
1404+
1405+
_original_get_instance = getattr(_dandi_utils, "_original_get_instance_fn", None)
1406+
if _original_get_instance is None and hasattr(_dandi_utils, "get_instance"):
14011407
_original = _dandi_utils.get_instance
1408+
14021409
def _patched_get_instance(dandi_instance_id, *args, **kwargs):
14031410
if dandi_instance_id == "dandi-staging":
14041411
dandi_instance_id = "dandi-sandbox"
14051412
return _original(dandi_instance_id, *args, **kwargs)
1413+
14061414
_dandi_utils._original_get_instance_fn = _original
14071415
_dandi_utils.get_instance = _patched_get_instance
14081416
except (ImportError, AttributeError):

0 commit comments

Comments
 (0)