Skip to content

Commit fb00e65

Browse files
Apply pre-commit fixes
1 parent c0a65f5 commit fb00e65

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/blosc2/lazyexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2804,7 +2804,7 @@ def find_args(expr):
28042804

28052805
return value, expression[idx:idx2]
28062806

2807-
def _compute_expr(self, item, kwargs): # noqa: C901
2807+
def _compute_expr(self, item, kwargs):
28082808
if any(method in self.expression for method in reducers):
28092809
# We have reductions in the expression (probably coming from a string lazyexpr)
28102810
# Also includes slice

src/blosc2/ndarray.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ def __setitem__(self, key, value):
10481048
super().__setitem__(key, value)
10491049

10501050

1051-
def detect_aligned_chunks( # noqa: C901
1051+
def detect_aligned_chunks(
10521052
key: Sequence[slice], shape: Sequence[int], chunks: Sequence[int], consecutive: bool = False
10531053
) -> list[int]:
10541054
"""
@@ -4026,7 +4026,7 @@ def copy(array: NDArray, dtype: np.dtype | str = None, **kwargs: Any) -> NDArray
40264026
return array.copy(dtype, **kwargs)
40274027

40284028

4029-
def concat(arrays: list[NDArray], /, axis=0, **kwargs: Any) -> NDArray: # noqa: C901
4029+
def concat(arrays: list[NDArray], /, axis=0, **kwargs: Any) -> NDArray:
40304030
"""Concatenate a list of arrays along a specified axis.
40314031
40324032
Parameters
@@ -4207,7 +4207,7 @@ def save(array: NDArray, urlpath: str, contiguous=True, **kwargs: Any) -> None:
42074207
array.save(urlpath, contiguous, **kwargs)
42084208

42094209

4210-
def asarray( # noqa : C901
4210+
def asarray(
42114211
array: Sequence | np.ndarray | blosc2.C2Array | NDArray, copy: bool | None = None, **kwargs: Any
42124212
) -> NDArray:
42134213
"""Convert the `array` to an `NDArray`.
@@ -4347,7 +4347,7 @@ def astype(
43474347
return asarray(array, dtype=dtype, casting=casting, copy=copy, **kwargs)
43484348

43494349

4350-
def _check_ndarray_kwargs(**kwargs): # noqa: C901
4350+
def _check_ndarray_kwargs(**kwargs):
43514351
storage = kwargs.get("storage")
43524352
if storage is not None:
43534353
for key in kwargs:

src/blosc2/proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def jit(func=None, *, out=None, disable=False, **kwargs): # noqa: C901
657657
[5 5 5 5]
658658
"""
659659

660-
def decorator(func): # noqa: C901
660+
def decorator(func):
661661
if disable:
662662
return func
663663

src/blosc2/schunk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def __dealloc__(self):
14701470
super().__dealloc__()
14711471

14721472

1473-
def open( # noqa: C901
1473+
def open(
14741474
urlpath: str | pathlib.Path | blosc2.URLPath, mode: str = "a", offset: int = 0, **kwargs: dict
14751475
) -> blosc2.SChunk | blosc2.NDArray | blosc2.C2Array | blosc2.LazyArray | blosc2.Proxy:
14761476
"""Open a persistent :ref:`SChunk`, :ref:`NDArray`, a remote :ref:`C2Array`

tests/ndarray/test_lazyexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def test_functions(function, dtype_fixture, shape_fixture):
365365
# ("scalar", "scalar") # Not supported by LazyExpr
366366
],
367367
)
368-
def test_arctan2_pow(urlpath, shape_fixture, dtype_fixture, function, value1, value2): # noqa: C901
368+
def test_arctan2_pow(urlpath, shape_fixture, dtype_fixture, function, value1, value2):
369369
nelems = np.prod(shape_fixture)
370370
if urlpath is None:
371371
urlpath1 = urlpath2 = urlpath_save = None

tests/test_open.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
(True, "a", "c"),
4040
],
4141
)
42-
def test_open(contiguous, urlpath, cparams, dparams, nchunks, chunk_nitems, dtype, mode, mmap_mode): # noqa: C901
42+
def test_open(contiguous, urlpath, cparams, dparams, nchunks, chunk_nitems, dtype, mode, mmap_mode):
4343
if os.name == "nt" and mmap_mode == "c":
4444
pytest.skip("Cannot test mmap_mode 'c' on Windows")
4545

tests/test_prefilters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
),
4949
],
5050
)
51-
def test_fillers( # noqa: C901
51+
def test_fillers(
5252
contiguous, urlpath, cparams, dparams, nchunks, nelem, func, op_dtype, op2_dtype, schunk_dtype, offset
5353
):
5454
blosc2.remove_urlpath(urlpath)

0 commit comments

Comments
 (0)