diff --git a/mypy/errors.py b/mypy/errors.py index 995ba10c6458..506e57df823e 100644 --- a/mypy/errors.py +++ b/mypy/errors.py @@ -511,7 +511,7 @@ def generate_ignore_without_code_errors(self, codes_hint = '' ignored_codes = used_ignored_lines[line] if ignored_codes: - codes_hint = f' (hint: add [{", ".join(ignored_codes)}])' + codes_hint = f' (currently ignored: [{", ".join(ignored_codes)}])' message = f'"type: ignore" comment without error code{codes_hint}' # Don't use report since add_error_info will ignore the error! diff --git a/test-data/unit/check-errorcodes.test b/test-data/unit/check-errorcodes.test index 1afcbab3621f..36fb19e46537 100644 --- a/test-data/unit/check-errorcodes.test +++ b/test-data/unit/check-errorcodes.test @@ -138,7 +138,7 @@ x # type: ignore[name-defined, attr-defined] # E: Unused "type: ignore[attr-defi [case testErrorCodeMissingWhenRequired] # flags: --enable-error-code ignore-without-code "x" # type: ignore # E: "type: ignore" comment without error code [ignore-without-code] -y # type: ignore # E: "type: ignore" comment without error code (hint: add [name-defined]) [ignore-without-code] +y # type: ignore # E: "type: ignore" comment without error code (currently ignored: [name-defined]) [ignore-without-code] z # type: ignore[name-defined] "a" # type: ignore[ignore-without-code]