From b0047b70c679dc6a9bbdd2812d7207464e9183c8 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 10 May 2022 19:50:51 +0200 Subject: [PATCH 1/2] chore(mypy): enable `ignore-without-code` error code --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c5cc1ee..5afe81e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,7 @@ show_error_codes = true warn_redundant_casts = true warn_unused_configs = true warn_unused_ignores = true +enable_error_code = ["ignore-without-code"] files = "src" [build-system] From 8c9998a245823a2452ea19cd36409679e2bbfbdb Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 10 May 2022 19:51:08 +0200 Subject: [PATCH 2/2] chore(pre-commit): remove obsolete `python-check-blanket-type-ignore` The hook is now obsolete, since `ignore-without-code` from `mypy` already checks for too broad `# type: ignore` --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82dd97e..7a4f6cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,6 @@ repos: hooks: - id: python-check-mock-methods - id: python-use-type-annotations - - id: python-check-blanket-type-ignore - id: python-check-blanket-noqa - repo: https://github.com/asottile/yesqa