diff --git a/.mypy.ini b/.mypy.ini index 289f3eb87..501ab747e 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -20,6 +20,7 @@ strict_equality = True ### Other strictness flags warn_unreachable = True disallow_any_unimported = True +enable_error_code = ignore-without-code ### Output show_error_codes = True diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index 400a7990e..37c59d98f 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -198,11 +198,6 @@ def check_spelling(args: argparse.Namespace) -> Optional[bool]: re.compile(r'(?i)# noqa(?!: )'), "Don't use a blanket 'noqa', use something like 'noqa: X123' instead.", ), - ( - re.compile(r'# type: ignore[^\[]'), - ("Don't use a blanket 'type: ignore', use something like " - "'type: ignore[error-code]' instead."), - ), ( re.compile(r'# type: (?!ignore(\[|$))'), "Don't use type comments, use type annotations instead.",