You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aliases_newtype.py:11:8 - error: Argument of type "Literal['user']" cannot be assigned to parameter "_x" of type "int" in function "__init__"
7
4
"Literal['user']" is not assignable to "int" (reportArgumentType)
8
5
aliases_newtype.py:12:14 - error: Type "Literal[42]" is not assignable to declared type "UserId"
9
6
"Literal[42]" is not assignable to "UserId" (reportAssignmentType)
7
+
aliases_newtype.py:18:11 - error: Type "type[UserId]" is not assignable to declared type "type"
8
+
"FunctionType" is not assignable to "type" (reportAssignmentType)
9
+
aliases_newtype.py:23:16 - error: Argument of type "type[UserId]" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "isinstance"
10
+
Type "FunctionType" is not assignable to type "_ClassInfo"
11
+
"FunctionType" is not assignable to "type"
12
+
"FunctionType" is not assignable to "UnionType"
13
+
"FunctionType" is not assignable to "tuple[_ClassInfo, ...]" (reportArgumentType)
10
14
aliases_newtype.py:23:16 - error: Second argument to "isinstance" must be a class or tuple of classes
11
15
Class created with NewType cannot be used with instance and class checks (reportArgumentType)
12
16
aliases_newtype.py:26:21 - error: Base class "UserId" is marked final and cannot be subclassed (reportGeneralTypeIssues)
@@ -20,7 +24,6 @@ aliases_newtype.py:61:38 - error: NewType cannot be used with structural type (a
20
24
aliases_newtype.py:63:15 - error: NewType requires two positional arguments (reportCallIssue)
21
25
aliases_newtype.py:65:38 - error: The second argument to NewType must be a known class, not Any or Unknown (reportGeneralTypeIssues)
generics_type_erasure.py:38:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"
7
4
Type "Literal['']" is not assignable to type "int | None"
0 commit comments