From e72894a72892719cdcb58dd7cfaea71f232dbfb6 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 16 Oct 2024 08:03:04 +0200 Subject: [PATCH] Enforce ruff/flake8-annotations rule ANN003 ANN003 Missing type annotation --- pyproject.toml | 5 ++--- src/zarr/testing/strategies.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3dc46a0f9c..83999f9b02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -226,9 +226,8 @@ extend-select = [ "W", # pycodestyle warnings ] ignore = [ - "ANN003", - "ANN101", - "ANN102", + "ANN101", # deprecated + "ANN102", # deprecated "ANN401", "PT004", # deprecated "PT005", # deprecated diff --git a/src/zarr/testing/strategies.py b/src/zarr/testing/strategies.py index bb9fda65a1..2c17fbf79d 100644 --- a/src/zarr/testing/strategies.py +++ b/src/zarr/testing/strategies.py @@ -159,7 +159,7 @@ def is_negative_slice(idx: Any) -> bool: @st.composite # type: ignore[misc] -def basic_indices(draw: st.DrawFn, *, shape: tuple[int], **kwargs) -> Any: # type: ignore[no-untyped-def] +def basic_indices(draw: st.DrawFn, *, shape: tuple[int], **kwargs: Any) -> Any: """Basic indices without unsupported negative slices.""" return draw( npst.basic_indices(shape=shape, **kwargs).filter(