diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54474a432d..c4132530af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ default_language_version: 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"] @@ -27,7 +27,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 @@ -46,7 +46,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 @@ -55,7 +55,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 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/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-" 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(