Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/zarr/_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -168,7 +168,7 @@ def remove_metadata(
)


@app.callback() # type: ignore[misc]
@app.callback() # type: ignore[untyped-decorator]
def main(
verbose: Annotated[
bool,
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously we didn't have bool in this union. now we do.

MemoryOrder = Literal["C", "F"]
AccessModeLiteral = Literal["r", "r+", "a", "w", "w-"]
ANY_ACCESS_MODE: Final = "r", "r+", "a", "w", "w-"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_metadata/test_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down