Skip to content

Commit

Permalink
restore ruff changes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Koncopd committed Jul 30, 2024
1 parent 2078c5b commit 6b09f87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lamindb/core/storage/_anndata_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def keys(storage: h5py.File):
StorageTypes.append(zarr.Group)

@registry.register_open("zarr")
def open(filepath: UPathStr, mode: Literal["r", "r+", "a", "w", "w-"] = "r"): # noqa
def open(filepath: UPathStr, mode: Literal["r", "r+", "a", "w", "w-"] = "r"):
assert mode in {"r", "r+", "a", "w", "w-"}, f"Unknown mode {mode}!" # noqa: S101

fs, file_path_str = infer_filesystem(filepath)
Expand All @@ -300,7 +300,7 @@ def read_dataframe(elem: Union[zarr.Array, zarr.Group]): # noqa
return read_elem(elem)

@registry.register("zarr")
def safer_read_partial(elem, indices): # noqa
def safer_read_partial(elem, indices):
encoding_type = get_spec(elem).encoding_type
if encoding_type == "":
if isinstance(elem, zarr.Array):
Expand Down Expand Up @@ -333,7 +333,7 @@ def safer_read_partial(elem, indices): # noqa

# this is needed because accessing zarr.Group.keys() directly is very slow
@registry.register("zarr")
def keys(storage: zarr.Group): # noqa
def keys(storage: zarr.Group):
paths = storage._store.keys()

attrs_keys: dict[str, list] = {}
Expand Down

0 comments on commit 6b09f87

Please sign in to comment.