From 40dc7d818482d08c2af242410ab23785bb436c2f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:42:47 +0000 Subject: [PATCH 1/4] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.12...v0.13.3) - [github.com/scientific-python/cookie: 2025.05.02 → 2025.10.01](https://github.com/scientific-python/cookie/compare/2025.05.02...2025.10.01) - [github.com/pre-commit/mirrors-mypy: v1.16.0 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.16.0...v1.18.2) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c08b8f8a..06acef38 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,26 +7,26 @@ ci: default_stages: [pre-commit, pre-push] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: check-yaml - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.12 + rev: v0.13.3 hooks: - id: ruff args: ["--fix", "--show-fixes"] - id: ruff-format - repo: https://github.com/scientific-python/cookie - rev: 2025.05.02 + rev: 2025.10.01 hooks: - id: sp-repo-review - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.16.0 + rev: v1.18.2 hooks: - id: mypy args: [--config-file, pyproject.toml] From 583ebf01faf339fadb6686628dd79ed75a686d64 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 7 Jul 2025 22:43:26 +0200 Subject: [PATCH 2/4] Update pre-commit legacy alias --- .pre-commit-config.yaml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06acef38..c02a7062 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.13.3 hooks: - - id: ruff + - id: ruff-check args: ["--fix", "--show-fixes"] - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index c925cd17..87cf3438 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -202,6 +202,7 @@ ignore = [ "PT001", "PT011", "PT012", + "PT031", "RET505", "RET506", "SIM108", From dffde80ff44ffcd647c569f31b5b1bd0571b947a Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:27:45 +0200 Subject: [PATCH 3/4] remove obsolete ruff rule warning: The following rules have been removed and ignoring them has no effect: - UP038 --- c-blosc | 2 +- pyproject.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/c-blosc b/c-blosc index 04c06fb7..616f4b73 160000 --- a/c-blosc +++ b/c-blosc @@ -1 +1 @@ -Subproject commit 04c06fb7339d3df3600b1862077b8699b30a0e1d +Subproject commit 616f4b7343a8479f7e71dd3d7025bd92c9a6bbd0 diff --git a/pyproject.toml b/pyproject.toml index 87cf3438..83674bc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -209,7 +209,6 @@ ignore = [ "TRY003", "TRY301", "UP007", - "UP038", # https://github.com/astral-sh/ruff/issues/7871 # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", "E111", @@ -267,4 +266,4 @@ features = ["test"] [tool.hatch.envs.test.scripts] list-deps = "pip list" -test-zarr = "pytest numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" \ No newline at end of file +test-zarr = "pytest numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" From 1a4d99f02ee77398bfa2b91d845dbe738b284587 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:28:50 +0200 Subject: [PATCH 4/4] Apply ruff rule RUF043 RUF043 Pattern passed to `match=` contains metacharacters but is neither escaped nor raw --- numcodecs/tests/test_zarr3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numcodecs/tests/test_zarr3.py b/numcodecs/tests/test_zarr3.py index 6102939e..4a362b31 100644 --- a/numcodecs/tests/test_zarr3.py +++ b/numcodecs/tests/test_zarr3.py @@ -181,7 +181,7 @@ def test_generic_filter_packbits(store: StorePath): a = zarr.open_array(store / "generic_packbits", mode="r") np.testing.assert_array_equal(data, a[:, :]) - with pytest.raises(ValueError, match=".*requires bool dtype.*"): + with pytest.raises(ValueError, match=r".*requires bool dtype.*"): zarr.create_array( store / "generic_packbits_err", shape=data.shape,