Skip to content

Commit 3282eb1

Browse files
enable sub_code_of=MISC for backwards compat reason
i also remembered how it is error codes are suppose to work exactly, which makea this make sense
1 parent a586b8e commit 3282eb1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mypy/errorcodes.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,6 @@ def __hash__(self) -> int:
273273
# Syntax errors are often blocking.
274274
SYNTAX: Final = ErrorCode("syntax", "Report syntax errors", "General")
275275

276-
UNTYPED_DECORATOR: Final = ErrorCode(
277-
"untyped-decorator", "Error if an untyped decorator makes a typed function untyped", "General"
278-
)
279-
280276
# This is an internal marker code for a whole-file ignore. It is not intended to
281277
# be user-visible.
282278
FILE: Final = ErrorCode("file", "Internal marker for a whole file being ignored", "General")
@@ -306,6 +302,13 @@ def __hash__(self) -> int:
306302
sub_code_of=MISC,
307303
)
308304

305+
UNTYPED_DECORATOR: Final = ErrorCode(
306+
"untyped-decorator",
307+
"Error if an untyped decorator makes a typed function untyped",
308+
"General",
309+
sub_code_of=MISC,
310+
)
311+
309312
NARROWED_TYPE_NOT_SUBTYPE: Final = ErrorCode(
310313
"narrowed-type-not-subtype",
311314
"Warn if a TypeIs function's narrowed type is not a subtype of the original type",

0 commit comments

Comments
 (0)