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/pyre/generics_type_erasure.toml
+8-12Lines changed: 8 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -9,25 +9,21 @@ output = """
9
9
generics_type_erasure.py:17:0 Assert type [70]: Expected `Node[str]` but got `Node[typing_extensions.Literal['']]`.
10
10
generics_type_erasure.py:18:0 Assert type [70]: Expected `Node[int]` but got `Node[typing_extensions.Literal[0]]`.
11
11
generics_type_erasure.py:19:0 Assert type [70]: Expected `Node[typing.Any]` but got `Node[Variable[T]]`.
12
-
generics_type_erasure.py:20:0 Assert type [70]: Expected `Node[Never]` but got `Node[Variable[T]]`.
13
-
generics_type_erasure.py:22:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.
14
-
generics_type_erasure.py:24:0 Assert type [70]: Expected `Never` but got `typing.Any`.
15
-
generics_type_erasure.py:40:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[int]` but got `str`.
16
-
generics_type_erasure.py:42:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[str]` but got `int`.
17
-
generics_type_erasure.py:58:0 Assert type [70]: Expected `bytes` but got `typing.Any`.
12
+
generics_type_erasure.py:21:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.
13
+
generics_type_erasure.py:38:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[int]` but got `str`.
14
+
generics_type_erasure.py:40:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[str]` but got `int`.
15
+
generics_type_erasure.py:56:0 Assert type [70]: Expected `bytes` but got `typing.Any`.
18
16
"""
19
17
conformance_automated = "Fail"
20
18
errors_diff = """
19
+
Line 42: Expected 1 errors
20
+
Line 43: Expected 1 errors
21
21
Line 44: Expected 1 errors
22
22
Line 45: Expected 1 errors
23
23
Line 46: Expected 1 errors
24
-
Line 47: Expected 1 errors
25
-
Line 48: Expected 1 errors
26
-
Lines 19, 20: Expected exactly one error (tag 'any-or-never1')
27
24
Line 17: Unexpected errors ["generics_type_erasure.py:17:0 Assert type [70]: Expected `Node[str]` but got `Node[typing_extensions.Literal['']]`."]
28
25
Line 18: Unexpected errors ['generics_type_erasure.py:18:0 Assert type [70]: Expected `Node[int]` but got `Node[typing_extensions.Literal[0]]`.']
29
26
Line 19: Unexpected errors ['generics_type_erasure.py:19:0 Assert type [70]: Expected `Node[typing.Any]` but got `Node[Variable[T]]`.']
30
-
Line 20: Unexpected errors ['generics_type_erasure.py:20:0 Assert type [70]: Expected `Node[Never]` but got `Node[Variable[T]]`.']
31
-
Line 22: Unexpected errors ['generics_type_erasure.py:22:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.']
32
-
Line 58: Unexpected errors ['generics_type_erasure.py:58:0 Assert type [70]: Expected `bytes` but got `typing.Any`.']
27
+
Line 21: Unexpected errors ['generics_type_erasure.py:21:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.']
28
+
Line 56: Unexpected errors ['generics_type_erasure.py:56:0 Assert type [70]: Expected `bytes` but got `typing.Any`.']
ERROR generics_type_erasure.py:40:16-18: Argument `Literal['']` is not assignable to parameter `label` with type `int | None` in function `Node.__init__` [bad-argument-type]
9
-
ERROR generics_type_erasure.py:42:16-17: Argument `Literal[0]` is not assignable to parameter `label` with type `str | None` in function `Node.__init__` [bad-argument-type]
10
-
ERROR generics_type_erasure.py:44:1-16: Generic attribute `label` of class `Node` is not visible on the class [no-access]
11
-
ERROR generics_type_erasure.py:45:1-16: Generic attribute `label` of class `Node` is not visible on the class [missing-attribute]
12
-
ERROR generics_type_erasure.py:46:1-11: Generic attribute `label` of class `Node` is not visible on the class [no-access]
13
-
ERROR generics_type_erasure.py:47:1-11: Generic attribute `label` of class `Node` is not visible on the class [missing-attribute]
14
-
ERROR generics_type_erasure.py:48:1-15: Generic attribute `label` of class `Node` is not visible on the class [missing-attribute]
6
+
ERROR generics_type_erasure.py:38:16-18: Argument `Literal['']` is not assignable to parameter `label` with type `int | None` in function `Node.__init__` [bad-argument-type]
7
+
ERROR generics_type_erasure.py:40:16-17: Argument `Literal[0]` is not assignable to parameter `label` with type `str | None` in function `Node.__init__` [bad-argument-type]
8
+
ERROR generics_type_erasure.py:42:1-16: Generic attribute `label` of class `Node` is not visible on the class [no-access]
9
+
ERROR generics_type_erasure.py:43:1-16: Generic attribute `label` of class `Node` is not visible on the class [missing-attribute]
10
+
ERROR generics_type_erasure.py:44:1-11: Generic attribute `label` of class `Node` is not visible on the class [no-access]
11
+
ERROR generics_type_erasure.py:45:1-11: Generic attribute `label` of class `Node` is not visible on the class [missing-attribute]
12
+
ERROR generics_type_erasure.py:46:1-15: Generic attribute `label` of class `Node` is not visible on the class [missing-attribute]
Copy file name to clipboardExpand all lines: conformance/results/pyright/generics_type_erasure.toml
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,18 @@
1
1
conformant = "Pass"
2
2
output = """
3
-
generics_type_erasure.py:20:13 - error: "assert_type" mismatch: expected "Node[Never]" but received "Node[Unknown]" (reportAssertTypeFailure)
4
-
generics_type_erasure.py:24:13 - error: "assert_type" mismatch: expected "Never" but received "Unknown" (reportAssertTypeFailure)
5
-
generics_type_erasure.py:40:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"
3
+
generics_type_erasure.py:38:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"
6
4
Type "Literal['']" is not assignable to type "int | None"
7
5
"Literal['']" is not assignable to "int"
8
6
"Literal['']" is not assignable to "None" (reportArgumentType)
9
-
generics_type_erasure.py:42:16 - error: Argument of type "Literal[0]" cannot be assigned to parameter "label" of type "str | None" in function "__init__"
7
+
generics_type_erasure.py:40:16 - error: Argument of type "Literal[0]" cannot be assigned to parameter "label" of type "str | None" in function "__init__"
10
8
Type "Literal[0]" is not assignable to type "str | None"
11
9
"Literal[0]" is not assignable to "str"
12
10
"Literal[0]" is not assignable to "None" (reportArgumentType)
13
-
generics_type_erasure.py:44:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
14
-
generics_type_erasure.py:45:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
15
-
generics_type_erasure.py:46:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
16
-
generics_type_erasure.py:47:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
17
-
generics_type_erasure.py:48:10 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
11
+
generics_type_erasure.py:42:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
12
+
generics_type_erasure.py:43:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
13
+
generics_type_erasure.py:44:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
14
+
generics_type_erasure.py:45:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
15
+
generics_type_erasure.py:46:10 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
Copy file name to clipboardExpand all lines: conformance/results/results.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ <h3>Python Type System Conformance Test Results</h3>
322
322
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not infer the type of an unannotated `self` parameter to be type `Self`.</p><p>Does not retain `Self` when calling method that returns `Self`.</p><p>Does not infer the type of an unannotated `cls` parameter to be type `type[Self]`.</p><p>Does not retain `Self` when accessing attribute through `type[Self]`.</p></span></div></th>
323
323
<thclass="column col2 conformant">Pass</th>
324
324
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not handle use of `Self` within class body correctly.</p><p>False negatives on assert_type uses.</p></span></div></th>
325
-
<thclass="column col2 conformant"><divclass="hover-text">Pass*<spanclass="tooltip-text" id="bottom"><p>True positive: Writing to a variable that contains Self (with a class) should error</p></span></div></th>
325
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Doesn't allow accessing `Self` in a classmethod</p></span></div></th>
326
326
<thclass="column col2 conformant"><divclass="hover-text">Pass*<spanclass="tooltip-text" id="bottom"><p>Treats attributes not initialized on the class as instance-only</p></span></div></th>
@@ -385,7 +385,7 @@ <h3>Python Type System Conformance Test Results</h3>
385
385
<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>
386
386
<thclass="column col2 conformant">Pass</th>
387
387
<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>
388
-
<thclass="column col2 conformant"><divclass="hover-text">Pass*<spanclass="tooltip-text" id="bottom"><p>True positive: Undefined type vars should be inferred as Never not Any (avoiding to introduce Any)</p></span></div></th>
388
+
<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></span></div></th>
0 commit comments