From 8d5d3963b09cf30591ffad621419dbe39f75c897 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 10 May 2022 19:50:57 +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 c1e2e32..6107f4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,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 dba13a01747e0564a350b632a2cd6795dfdc631d Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 10 May 2022 19:51:11 +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 2287f1c..9320dd2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,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