From 10d9288d65d88ac1376248553356d7b7b913aac6 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 10 May 2022 19:43:26 +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 d679064c2..118e03124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,7 @@ strict = true explicit_package_bases = true namespace_packages = true show_error_codes = true +enable_error_code = ["ignore-without-code"] mypy_path = "src" files = "src, tests" exclude = "(?x)(^tests/.*/fixtures | ^src/poetry/core/_vendor)" From c8bf2dc9ae0618729e0561064ad9b68db1b919f6 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Tue, 10 May 2022 19:43:36 +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 2b0e1a193..16596cf78 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,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