| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -274,3 +274,6 @@ def __hash__(self) -> int: | |||
| 274 | 274 | "General", | |
| 275 | 275 | sub_code_of=MISC, | |
| 276 | 276 | ) | |
| 277 | + | ||
| 278 | + # This copy will not include any error codes defined later in the plugins. | ||
| 279 | + mypy_error_codes = error_codes.copy() | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | from typing_extensions import Literal, TypeAlias as _TypeAlias | |
| 9 | 9 | ||
| 10 | 10 | from mypy import errorcodes as codes | |
| 11 | - from mypy.errorcodes import IMPORT, IMPORT_NOT_FOUND, IMPORT_UNTYPED, ErrorCode | ||
| 11 | + from mypy.errorcodes import IMPORT, IMPORT_NOT_FOUND, IMPORT_UNTYPED, ErrorCode, mypy_error_codes | ||
| 12 | 12 | from mypy.message_registry import ErrorMessage | |
| 13 | 13 | from mypy.options import Options | |
| 14 | 14 | from mypy.scope import Scope | |
@@ -560,6 +560,7 @@ def add_error_info(self, info: ErrorInfo) -> None: | |||
| 560 | 560 | and not self.options.hide_error_codes | |
| 561 | 561 | and info.code is not None | |
| 562 | 562 | and info.code not in HIDE_LINK_CODES | |
| 563 | + and info.code.code in mypy_error_codes | ||
| 563 | 564 | ): | |
| 564 | 565 | message = f"See {BASE_RTD_URL}-{info.code.code} for more info" | |
| 565 | 566 | if message in self.only_once_messages: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments