Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 22, 2024
1 parent 968f414 commit 03f959e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rds2py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
from .generics import read_rds
from .read_atomic import parse_boolean_vector, parse_double_vector, parse_integer_vector, parse_string_vector
from .read_matrix import parse_dgcmatrix, parse_dgrmatrix, parse_dgtmatrix, parse_ndarray
from .read_frame import parse_data_frame, parse_dframe
from .read_frame import parse_data_frame, parse_dframe
4 changes: 2 additions & 2 deletions src/rds2py/rdsutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def get_class(robj: dict) -> str:
if is_integer:
if "dim" in obj_attr:
return "ndarray"
else:
else:
return robj["class_name"]

if "class" in obj_attr:
return obj_attr["class"]["data"][0]

Expand Down
1 change: 0 additions & 1 deletion src/rds2py/read_matrix.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Literal

from biocutils import BooleanList, FloatList, IntegerList, StringList

from .rdsutils import get_class

Expand Down
1 change: 1 addition & 0 deletions tests/test_atomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_read_atomic_attrs():
assert len(data) == 1000
assert data.names is not None


## Booleans


Expand Down
2 changes: 1 addition & 1 deletion tests/test_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_read_s4_matrix_dgc():
array = read_rds("tests/data/s4_matrix.rds")

assert array is not None
assert isinstance(array, sp.spmatrix)

Expand Down

0 comments on commit 03f959e

Please sign in to comment.