From ee9a110d2921ea3eb28efd839ef143403bca6bc8 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Fri, 17 Jan 2025 18:58:23 +0000 Subject: [PATCH] Enable some stricter typing rules (#679) --- numcodecs/checksum32.py | 2 +- pyproject.toml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/numcodecs/checksum32.py b/numcodecs/checksum32.py index 4a706c71..f1d82623 100644 --- a/numcodecs/checksum32.py +++ b/numcodecs/checksum32.py @@ -13,7 +13,7 @@ _crc32c: Optional[ModuleType] = None with suppress(ImportError): - import crc32c as _crc32c # type: ignore[no-redef] + import crc32c as _crc32c # type: ignore[no-redef, unused-ignore] if TYPE_CHECKING: # pragma: no cover from typing_extensions import Buffer diff --git a/pyproject.toml b/pyproject.toml index 817f138c..ca0de940 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -237,3 +237,6 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] # TODO: set options below to true strict = false warn_unreachable = false +warn_redundant_casts = true +warn_unused_ignores = true +warn_unused_configs = true