diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d2ce60384..7f1d4d407 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -134,6 +134,13 @@ repos: rev: v1.9.0 hooks: - id: rst-backticks + - id: python-check-blanket-noqa + exclude: "docs|tests?" + - id: python-check-blanket-type-ignore + exclude: "docs|tests?" + - id: python-use-type-annotations + - id: rst-directive-colons + - id: rst-inline-touching-normal - repo: https://github.com/codespell-project/codespell rev: v2.1.0 diff --git a/glotaran/deprecation/deprecation_utils.py b/glotaran/deprecation/deprecation_utils.py index d6547116b..69db4d88c 100644 --- a/glotaran/deprecation/deprecation_utils.py +++ b/glotaran/deprecation/deprecation_utils.py @@ -98,7 +98,7 @@ def parse_version(version_str: str) -> tuple[int, int, int]: if len(split_version) < 3: raise ValueError(error_message) try: - return tuple(map(int, split_version[:3])) # type:ignore [return-value] + return tuple(map(int, split_version[:3])) # type:ignore[return-value] except ValueError: raise ValueError(error_message) @@ -346,7 +346,7 @@ def outer_wrapper(deprecated_object: DecoratedCallable) -> DecoratedCallable: setattr( deprecated_object, "__new__", - inject_warn_into_call(deprecated_object.__new__), # type: ignore [arg-type] + inject_warn_into_call(deprecated_object.__new__), # type: ignore[arg-type] ) return deprecated_object # type: ignore[return-value]