From 9777b2df1e5cfc95bef942d2934fa249c56e2554 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 3 May 2022 21:45:01 +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 c944c070ef2..4cd67bb4568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,6 +106,7 @@ force-exclude = ''' files = "src" show_error_codes = true strict = true +enable_error_code = ["ignore-without-code"] # The following whitelist is used to allow for incremental adoption # of Mypy. Modules should be removed from this whitelist as and when From d3e6778d16dbc5c8a0e5394f2e7d7fa19134e70c Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 3 May 2022 21:45:30 +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 ffd8754cbd2..552af606ecd 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