Skip to content

Commit 79d864e

Browse files
chore: update pre-commit hooks (#3610)
* chore: update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.10](astral-sh/ruff-pre-commit@v0.14.3...v0.14.10) - [github.com/pre-commit/mirrors-mypy: v1.18.2 → v1.19.1](pre-commit/mirrors-mypy@v1.18.2...v1.19.1) - [github.com/scientific-python/cookie: 2025.10.20 → 2025.11.21](scientific-python/cookie@2025.10.20...2025.11.21) - [github.com/numpy/numpydoc: v1.9.0 → v1.10.0](numpy/numpydoc@v1.9.0...v1.10.0) * update JSON union to include bool * apply fixes to resolve pre-commit violations --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Davis Bennett <[email protected]>
1 parent 034cd20 commit 79d864e

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ default_language_version:
1010

1111
repos:
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.14.3
13+
rev: v0.14.10
1414
hooks:
1515
- id: ruff-check
1616
args: ["--fix", "--show-fixes"]
@@ -27,7 +27,7 @@ repos:
2727
exclude: mkdocs.yml
2828
- id: trailing-whitespace
2929
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v1.18.2
30+
rev: v1.19.1
3131
hooks:
3232
- id: mypy
3333
files: src|tests
@@ -46,7 +46,7 @@ repos:
4646
- hypothesis
4747
- s3fs
4848
- repo: https://github.com/scientific-python/cookie
49-
rev: 2025.10.20
49+
rev: 2025.11.21
5050
hooks:
5151
- id: sp-repo-review
5252
- repo: https://github.com/pre-commit/pygrep-hooks
@@ -55,7 +55,7 @@ repos:
5555
- id: rst-directive-colons
5656
- id: rst-inline-touching-normal
5757
- repo: https://github.com/numpy/numpydoc
58-
rev: v1.9.0
58+
rev: v1.10.0
5959
hooks:
6060
- id: numpydoc-validation
6161
- repo: https://github.com/twisted/towncrier

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ ignore_errors = true
395395
minversion = "7"
396396
testpaths = ["tests", "docs/user-guide"]
397397
log_cli_level = "INFO"
398+
log_level = "INFO"
398399
xfail_strict = true
399400
asyncio_mode = "auto"
400401
asyncio_default_fixture_loop_scope = "function"

src/zarr/_cli/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CLIZarrFormatV3(str, Enum):
3535
v3 = "v3"
3636

3737

38-
@app.command() # type: ignore[misc]
38+
@app.command() # type: ignore[untyped-decorator]
3939
def migrate(
4040
zarr_format: Annotated[
4141
CLIZarrFormatV3,
@@ -120,7 +120,7 @@ def migrate(
120120
sync(migrate_metadata.remove_metadata(write_store, 2, force=False, dry_run=dry_run))
121121

122122

123-
@app.command() # type: ignore[misc]
123+
@app.command() # type: ignore[untyped-decorator]
124124
def remove_metadata(
125125
zarr_format: Annotated[
126126
CLIZarrFormat,
@@ -168,7 +168,7 @@ def remove_metadata(
168168
)
169169

170170

171-
@app.callback() # type: ignore[misc]
171+
@app.callback() # type: ignore[untyped-decorator]
172172
def main(
173173
verbose: Annotated[
174174
bool,

src/zarr/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
ChunkCoords = tuple[int, ...]
4343
ZarrFormat = Literal[2, 3]
4444
NodeType = Literal["array", "group"]
45-
JSON = str | int | float | Mapping[str, "JSON"] | Sequence["JSON"] | None
45+
JSON = str | int | float | bool | Mapping[str, "JSON"] | Sequence["JSON"] | None
4646
MemoryOrder = Literal["C", "F"]
4747
AccessModeLiteral = Literal["r", "r+", "a", "w", "w-"]
4848
ANY_ACCESS_MODE: Final = "r", "r+", "a", "w", "w-"

tests/test_metadata/test_v2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,13 @@ def test_from_dict_extra_fields() -> None:
309309

310310

311311
def test_zstd_checksum() -> None:
312+
compressor_config: dict[str, JSON] = {"id": "zstd", "level": 5, "checksum": False}
312313
arr = zarr.create_array(
313314
{},
314315
shape=(10,),
315316
chunks=(10,),
316317
dtype="int32",
317-
compressors={"id": "zstd", "level": 5, "checksum": False},
318+
compressors=compressor_config,
318319
zarr_format=2,
319320
)
320321
metadata = json.loads(

0 commit comments

Comments
 (0)