From d7440c2d300a07ca67fb1d351216cb0fb763a17a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 00:00:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/rds2py/__init__.py | 2 +- src/rds2py/read_dict.py | 4 +++- src/rds2py/read_sce.py | 8 +++++++- tests/test_sce.py | 1 - 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/rds2py/__init__.py b/src/rds2py/__init__.py index cf29ce9..2e4bf04 100644 --- a/src/rds2py/__init__.py +++ b/src/rds2py/__init__.py @@ -24,4 +24,4 @@ from .read_granges import parse_genomic_ranges, parse_granges_list from .read_rle import parse_rle from .read_se import parse_summarized_experiment, parse_ranged_summarized_experiment -from .read_sce import parse_single_cell_experiment \ No newline at end of file +from .read_sce import parse_single_cell_experiment diff --git a/src/rds2py/read_dict.py b/src/rds2py/read_dict.py index 9c8b7ee..63314ac 100644 --- a/src/rds2py/read_dict.py +++ b/src/rds2py/read_dict.py @@ -11,7 +11,9 @@ def parse_vector(robject: dict): _cls = get_class(robject) if _cls not in ["vector"]: - raise RuntimeError(f"`robject` does not contain not a vector/dictionary object, contains `{_cls}`.") + raise RuntimeError( + f"`robject` does not contain not a vector/dictionary object, contains `{_cls}`." + ) dict_keys = list(_dispatcher(robject["attributes"]["names"])) diff --git a/src/rds2py/read_sce.py b/src/rds2py/read_sce.py index 4a12700..b82f6b3 100644 --- a/src/rds2py/read_sce.py +++ b/src/rds2py/read_sce.py @@ -33,7 +33,13 @@ def parse_single_cell_experiment(robject: dict): # check red. dims, alternative expts robj_reduced_dims = None robj_altExps = None - col_attrs = list(_dispatcher(robject["attributes"]["int_colData"]["attributes"]["listData"]["attributes"]["names"])) + col_attrs = list( + _dispatcher( + robject["attributes"]["int_colData"]["attributes"]["listData"][ + "attributes" + ]["names"] + ) + ) for idx in range(len(col_attrs)): idx_col = col_attrs[idx] diff --git a/tests/test_sce.py b/tests/test_sce.py index bade587..6edaa0a 100644 --- a/tests/test_sce.py +++ b/tests/test_sce.py @@ -15,4 +15,3 @@ def test_read_sce(): assert data is not None assert isinstance(data, SingleCellExperiment) assert data.shape == (100, 100) -