From e58748035544b0a0f5536243d685accdbcad7a3f Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 22 Sep 2025 22:42:33 +0200 Subject: [PATCH] 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.12.11 → v0.13.1 - github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2 --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- src/zarr/core/dtype/wrapper.py | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e2826f10f..da3e2be9b2 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.12.11 + rev: v0.13.1 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.17.1 + rev: v1.18.2 hooks: - id: mypy files: src|tests diff --git a/pyproject.toml b/pyproject.toml index f6293a6df1..8b251fdd55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -316,9 +316,9 @@ ignore = [ "RET505", "RET506", "RUF005", + "RUF043", "SIM108", "TRY003", - "UP038", # https://github.com/astral-sh/ruff/issues/7871 # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", "E111", diff --git a/src/zarr/core/dtype/wrapper.py b/src/zarr/core/dtype/wrapper.py index 776aea81d8..e44449585b 100644 --- a/src/zarr/core/dtype/wrapper.py +++ b/src/zarr/core/dtype/wrapper.py @@ -71,10 +71,7 @@ class variable, and it should generally be unique across different data types. """ # this class will create a native data type - # mypy currently disallows class variables to contain type parameters - # but it seems OK for us to use it here: - # https://github.com/python/typing/discussions/1424#discussioncomment-7989934 - dtype_cls: ClassVar[type[TDType_co]] # type: ignore[misc] + dtype_cls: ClassVar[type[TDType_co]] _zarr_v3_name: ClassVar[str] @classmethod