Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2024
1 parent e3c8516 commit 69061ea
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions zarr/convenience.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Convenience functions for storing and loading data."""

import itertools
import os
import re
Expand Down
8 changes: 5 additions & 3 deletions zarr/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2060,9 +2060,11 @@ def _process_chunk(
index_selection = PartialChunkIterator(chunk_selection, self.chunks)
for start, nitems, partial_out_selection in index_selection:
expected_shape = [
len(range(*partial_out_selection[i].indices(self.chunks[0] + 1)))
if i < len(partial_out_selection)
else dim
(
len(range(*partial_out_selection[i].indices(self.chunks[0] + 1)))
if i < len(partial_out_selection)
else dim
)
for i, dim in enumerate(self.chunks)
]
if isinstance(cdata, UncompressedPartialReadBufferV3):
Expand Down
10 changes: 5 additions & 5 deletions zarr/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,11 @@ def ix_(selection, shape):

# replace slice and int as these are not supported by numpy.ix_
selection = [
slice_to_range(dim_sel, dim_len)
if isinstance(dim_sel, slice)
else [dim_sel]
if is_integer(dim_sel)
else dim_sel
(
slice_to_range(dim_sel, dim_len)
if isinstance(dim_sel, slice)
else [dim_sel] if is_integer(dim_sel) else dim_sel
)
for dim_sel, dim_len in zip(selection, shape)
]

Expand Down
1 change: 1 addition & 0 deletions zarr/n5.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module contains a storage class and codec to support the N5 format.
"""

import os
import struct
import sys
Expand Down
1 change: 1 addition & 0 deletions zarr/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
path) and a `getsize` method (return the size in bytes of a given value).
"""

import atexit
import errno
import glob
Expand Down
3 changes: 1 addition & 2 deletions zarr/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
class Synchronizer(Protocol):
"""Base class for synchronizers."""

def __getitem__(self, item):
...
def __getitem__(self, item): ...


class ThreadSynchronizer(Synchronizer):
Expand Down
3 changes: 1 addition & 2 deletions zarr/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@


class MetaArray(Protocol):
def __array_function__(self, func, types, args, kwargs):
...
def __array_function__(self, func, types, args, kwargs): ...

0 comments on commit 69061ea

Please sign in to comment.