From 49b53684415a622f5f062820d20d8477f5c5f197 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 19:15:40 +0000 Subject: [PATCH 1/3] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.3...v0.14.10) - [github.com/pre-commit/mirrors-mypy: v1.18.2 → v1.19.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.18.2...v1.19.1) - [github.com/scientific-python/cookie: 2025.10.20 → 2025.11.21](https://github.com/scientific-python/cookie/compare/2025.10.20...2025.11.21) - [github.com/numpy/numpydoc: v1.9.0 → v1.10.0](https://github.com/numpy/numpydoc/compare/v1.9.0...v1.10.0) --- .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 cb1b75d90b..978dc8dde6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: default_stages: [pre-commit, pre-push] repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.3 + rev: v0.14.10 hooks: - id: ruff-check args: ["--fix", "--show-fixes"] @@ -23,7 +23,7 @@ repos: exclude: mkdocs.yml - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.2 + rev: v1.19.1 hooks: - id: mypy files: src|tests @@ -42,7 +42,7 @@ repos: - hypothesis - s3fs - repo: https://github.com/scientific-python/cookie - rev: 2025.10.20 + rev: 2025.11.21 hooks: - id: sp-repo-review - repo: https://github.com/pre-commit/pygrep-hooks @@ -51,7 +51,7 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/numpy/numpydoc - rev: v1.9.0 + rev: v1.10.0 hooks: - id: numpydoc-validation - repo: https://github.com/twisted/towncrier From 103d6099e64e965ac9d69c2f110b51333575f6be Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Thu, 8 Jan 2026 14:07:27 +0100 Subject: [PATCH 2/3] update JSON union to include bool --- src/zarr/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zarr/core/common.py b/src/zarr/core/common.py index 9b3d297298..d38949657e 100644 --- a/src/zarr/core/common.py +++ b/src/zarr/core/common.py @@ -42,7 +42,7 @@ ChunkCoords = tuple[int, ...] ZarrFormat = Literal[2, 3] NodeType = Literal["array", "group"] -JSON = str | int | float | Mapping[str, "JSON"] | Sequence["JSON"] | None +JSON = str | int | float | bool | Mapping[str, "JSON"] | Sequence["JSON"] | None MemoryOrder = Literal["C", "F"] AccessModeLiteral = Literal["r", "r+", "a", "w", "w-"] ANY_ACCESS_MODE: Final = "r", "r+", "a", "w", "w-" From 0b056fb28063e623a161c8d4a31dc592bac8b32d Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Thu, 8 Jan 2026 14:12:05 +0100 Subject: [PATCH 3/3] apply fixes to resolve pre-commit violations --- pyproject.toml | 1 + src/zarr/_cli/cli.py | 6 +++--- tests/test_metadata/test_v2.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d1cb55c6cf..a39956af5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -395,6 +395,7 @@ ignore_errors = true minversion = "7" testpaths = ["tests", "docs/user-guide"] log_cli_level = "INFO" +log_level = "INFO" xfail_strict = true asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" diff --git a/src/zarr/_cli/cli.py b/src/zarr/_cli/cli.py index 35521f01ab..78f4955d84 100644 --- a/src/zarr/_cli/cli.py +++ b/src/zarr/_cli/cli.py @@ -35,7 +35,7 @@ class CLIZarrFormatV3(str, Enum): v3 = "v3" -@app.command() # type: ignore[misc] +@app.command() # type: ignore[untyped-decorator] def migrate( zarr_format: Annotated[ CLIZarrFormatV3, @@ -120,7 +120,7 @@ def migrate( sync(migrate_metadata.remove_metadata(write_store, 2, force=False, dry_run=dry_run)) -@app.command() # type: ignore[misc] +@app.command() # type: ignore[untyped-decorator] def remove_metadata( zarr_format: Annotated[ CLIZarrFormat, @@ -168,7 +168,7 @@ def remove_metadata( ) -@app.callback() # type: ignore[misc] +@app.callback() # type: ignore[untyped-decorator] def main( verbose: Annotated[ bool, diff --git a/tests/test_metadata/test_v2.py b/tests/test_metadata/test_v2.py index 424b2881d6..8c3082e924 100644 --- a/tests/test_metadata/test_v2.py +++ b/tests/test_metadata/test_v2.py @@ -309,12 +309,13 @@ def test_from_dict_extra_fields() -> None: def test_zstd_checksum() -> None: + compressor_config: dict[str, JSON] = {"id": "zstd", "level": 5, "checksum": False} arr = zarr.create_array( {}, shape=(10,), chunks=(10,), dtype="int32", - compressors={"id": "zstd", "level": 5, "checksum": False}, + compressors=compressor_config, zarr_format=2, ) metadata = json.loads(