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
Copy file name to clipboardExpand all lines: conformance/results/pyright/generics_type_erasure.toml
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
-
conformant = "Pass"
1
+
conformant = "Partial"
2
+
notes = """
3
+
no error for `type(n1).label`
4
+
"""
2
5
output = """
3
6
generics_type_erasure.py:38:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"
4
7
Type "Literal['']" is not assignable to type "int | None"
aliases_typealiastype.py:19:51: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Name 'GoodAlias4' is not defined [name-error]
21
+
aliases_typealiastype.py:19:42: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: unsupported operand type(s) for |: 'T: TypeVar' and ''list[GoodAlias4[T]]': str' [unsupported-operands]
22
22
23
-
GoodAlias4 = TypeAliasType("GoodAlias4", T | list[GoodAlias4[T]], type_params=(T,))
24
-
\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m
23
+
GoodAlias4 = TypeAliasType("GoodAlias4", T | "list[GoodAlias4[T]]", type_params=(T,))
aliases_typealiastype.py:22:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Name 'GoodAlias5' is not defined [name-error]
26
+
aliases_typealiastype.py:22:68: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Invalid type annotation '<instance of tuple[nothing, ...]>' [invalid-annotation]
aliases_typealiastype.py:22:66: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Invalid type annotation '<instance of tuple[nothing, ...]>' [invalid-annotation]
31
+
aliases_typealiastype.py:22:35: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Invalid type annotation '<instance of TypeAliasType>' [invalid-annotation]
aliases_typealiastype.py:32:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: No attribute 'other_attrib' on TypeAliasType [attribute-error]
aliases_typealiastype.py:46:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Name 'BadAlias4' is not defined [name-error]
41
+
aliases_typealiastype.py:47:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: unsupported operand type(s) for |: 'T: TypeVar' and ''BadAlias5[str]': str' [unsupported-operands]
BadAlias21 = TypeAliasType("BadAlias21", list[BadAlias21]) # E
49
+
\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m
55
50
56
51
"""
57
52
conformance_automated = "Fail"
@@ -60,6 +55,8 @@ Line 40: Expected 1 errors
60
55
Line 43: Expected 1 errors
61
56
Line 44: Expected 1 errors
62
57
Line 45: Expected 1 errors
58
+
Line 46: Expected 1 errors
59
+
Line 48: Expected 1 errors
63
60
Line 52: Expected 1 errors
64
61
Line 53: Expected 1 errors
65
62
Line 54: Expected 1 errors
@@ -76,6 +73,6 @@ Line 64: Expected 1 errors
76
73
Line 5: Unexpected errors ['aliases_typealiastype.py:5:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: typing.TypeVarTuple not supported yet [not-supported-yet]']
77
74
Line 11: Unexpected errors ['aliases_typealiastype.py:11:6: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Function TypeVarTuple.__init__ expects 1 arg(s), got 2 [wrong-arg-count]']
78
75
Line 16: Unexpected errors ["aliases_typealiastype.py:16:14: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Invalid type annotation '<instance of Callable>' [invalid-annotation]"]
79
-
Line 19: Unexpected errors ["aliases_typealiastype.py:19:51: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Name 'GoodAlias4' is not defined [name-error]"]
80
-
Line 22: Unexpected errors ["aliases_typealiastype.py:22:40: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Name 'GoodAlias5' is not defined [name-error]", "aliases_typealiastype.py:22:66: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Invalid type annotation '<instance of tuple[nothing, ...]>' [invalid-annotation]"]
76
+
Line 19: Unexpected errors ["aliases_typealiastype.py:19:42: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: unsupported operand type(s) for |: 'T: TypeVar' and ''list[GoodAlias4[T]]': str' [unsupported-operands]"]
77
+
Line 22: Unexpected errors ["aliases_typealiastype.py:22:68: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Invalid type annotation '<instance of tuple[nothing, ...]>' [invalid-annotation]", "aliases_typealiastype.py:22:35: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: Invalid type annotation '<instance of TypeAliasType>' [invalid-annotation]"]
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Infers Node[Never] instead of Node[Any] when argument is not provided.</p><p>False negative on instance attribute access on type(node).</p></span></div></th>
359
-
<thclass="column col2 conformant">Pass</th>
359
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>no error for `type(n1).label`</p></span></div></th>
360
360
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not erase unspecified type variables to `Any` prior to `assert_type` handling.</p><p>False negatives on instance attribute access on the type.</p><p>Does not infer type of `DefaultDict` with explicit type parameters on constructor.</p><p>False negatives on assert_type uses.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Incorrectly rejects some recursive type aliases using TypeAliasType.</p><p>Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.</p></span></div></th>
<thclass="column col2 not-conformant"><divclass="hover-text">Unsupported<spanclass="tooltip-text" id="bottom"><p>Support for TypeAliasType is not implemented.</p></span></div></th>
496
496
<thclass="column col2 not-conformant"><divclass="hover-text">Unsupported<spanclass="tooltip-text" id="bottom"><p>Support for TypeAliasType is not implemented.</p></span></div></th>
0 commit comments