From c6d6563ce64f34f3addb44546369b517d10a7e3d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:52:23 +0000 Subject: [PATCH 1/3] ci: pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.22 → v0.16.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.0) - [github.com/tox-dev/pyproject-fmt: v2.25.3 → v2.26.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.25.3...v2.26.0) - [github.com/biomejs/pre-commit: v2.5.4 → v2.5.5](https://github.com/biomejs/pre-commit/compare/v2.5.4...v2.5.5) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d62b6c5..17f196a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: trailing-whitespace - id: no-commit-to-branch - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.22 + rev: v0.16.0 hooks: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] @@ -14,11 +14,11 @@ repos: args: [--preview, --select=CPY] - id: ruff-format - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.25.3 + rev: v2.26.0 hooks: - id: pyproject-fmt - repo: https://github.com/biomejs/pre-commit - rev: v2.5.4 + rev: v2.5.5 hooks: - id: biome-format - repo: https://github.com/pre-commit/mirrors-mypy From 061524423ddd6f3c16df0e2c5aaff48413417ec3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:52:48 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/fast_array_utils/_plugins/numba_sparse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fast_array_utils/_plugins/numba_sparse.py b/src/fast_array_utils/_plugins/numba_sparse.py index 3796af1..b5759f0 100644 --- a/src/fast_array_utils/_plugins/numba_sparse.py +++ b/src/fast_array_utils/_plugins/numba_sparse.py @@ -183,7 +183,7 @@ def box_matrix(typ: CSType, val: NativeValue, c: BoxContext) -> Value: # See https://numba.readthedocs.io/en/stable/extending/overloading-guide.html @overload(np.shape) -def overload_sparse_shape(x: CSType) -> None | Callable[[CSType], nbtypes.UniTuple]: +def overload_sparse_shape(x: CSType) -> Callable[[CSType], nbtypes.UniTuple] | None: if not isinstance(x, CSType): # pragma: no cover return None @@ -195,7 +195,7 @@ def shape(x: CSType) -> nbtypes.UniTuple: # pragma: no cover @overload_attribute(CSType, "ndim") -def overload_sparse_ndim(inst: CSType) -> None | Callable[[CSType], int]: +def overload_sparse_ndim(inst: CSType) -> Callable[[CSType], int] | None: if not isinstance(inst, CSType): # pragma: no cover return None @@ -241,7 +241,7 @@ def _construct( @overload_method(CSType, "copy") -def overload_sparse_copy(inst: CSType) -> None | Callable[[CSType], CSType]: +def overload_sparse_copy(inst: CSType) -> Callable[[CSType], CSType] | None: if not isinstance(inst, CSType): # pragma: no cover return None From e9d7c2a41cc213deb2f95954fe07b84da55e3590 Mon Sep 17 00:00:00 2001 From: "Philipp A." Date: Tue, 28 Jul 2026 09:04:54 +0200 Subject: [PATCH 3/3] style: fix --- src/fast_array_utils/_plugins/numba_sparse.py | 2 +- tests/test_numba.py | 2 +- tests/test_stats.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fast_array_utils/_plugins/numba_sparse.py b/src/fast_array_utils/_plugins/numba_sparse.py index b5759f0..9fda830 100644 --- a/src/fast_array_utils/_plugins/numba_sparse.py +++ b/src/fast_array_utils/_plugins/numba_sparse.py @@ -207,7 +207,7 @@ def ndim(inst: CSType) -> int: # pragma: no cover @intrinsic -def _sparse_copy( +def _sparse_copy( # noqa: PLR0917 typingctx: TypingContext, # noqa: ARG001 inst: CSType, data: nbtypes.Array, # noqa: ARG001 diff --git a/tests/test_numba.py b/tests/test_numba.py index 1612023..503b21c 100644 --- a/tests/test_numba.py +++ b/tests/test_numba.py @@ -162,6 +162,7 @@ def compiled(*_args: object, **_kwargs: object) -> bool: ], ) def test_probe_needed( + *, monkeypatch: pytest.MonkeyPatch, platform_name: str, machine: str, @@ -169,7 +170,6 @@ def test_probe_needed( layer: fa_numba.ThreadingLayer | fa_numba.TheadingCategory, priority: tuple[fa_numba.ThreadingLayer, ...], layers: dict[fa_numba.TheadingCategory, set[fa_numba.ThreadingLayer]] | None, - *, expected: bool, ) -> None: _set_runtime(monkeypatch, platform_name=platform_name, machine=machine, loaded=loaded, layer=layer, priority=priority, layers=layers) diff --git a/tests/test_stats.py b/tests/test_stats.py index dd42da6..6d1b1cc 100644 --- a/tests/test_stats.py +++ b/tests/test_stats.py @@ -160,6 +160,7 @@ def test_ndim_error( @pytest.mark.array_type(skip=ATS_SPARSE_DS) def test_sum( + *, request: pytest.FixtureRequest, array_type: ArrayType[CpuArray | GpuArray | DiskArray | types.DaskArray], dtype_in: type[DTypeIn],