Skip to content

Commit b670c0c

Browse files
committed
conformance: update results
1 parent b8548b8 commit b670c0c

File tree

9 files changed

+44
-42
lines changed

9 files changed

+44
-42
lines changed

conformance/results/mypy/aliases_typealiastype.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Incorrectly rejects some recursive type aliases using TypeAliasType.
44
Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.
55
"""
66
output = """
7-
aliases_typealiastype.py:19: error: Cannot resolve name "GoodAlias4" (possible cyclic definition) [misc]
87
aliases_typealiastype.py:20: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]
98
aliases_typealiastype.py:22: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]
109
aliases_typealiastype.py:27: error: Type variable "T" is not included in type_params [valid-type]
@@ -17,7 +16,6 @@ aliases_typealiastype.py:46: error: Cannot resolve name "BadAlias4" (possible cy
1716
aliases_typealiastype.py:47: error: Invalid recursive alias: a union item of itself [misc]
1817
aliases_typealiastype.py:48: error: Cannot resolve name "BadAlias6" (possible cyclic definition) [misc]
1918
aliases_typealiastype.py:48: error: Cannot resolve name "BadAlias7" (possible cyclic definition) [misc]
20-
aliases_typealiastype.py:48: error: Name "BadAlias7" is used before definition [used-before-def]
2119
aliases_typealiastype.py:49: error: Cannot resolve name "BadAlias7" (possible cyclic definition) [misc]
2220
aliases_typealiastype.py:52: error: Invalid type alias: expression is not a valid type [valid-type]
2321
aliases_typealiastype.py:53: error: Bracketed expression "[...]" is not valid as a type [valid-type]
@@ -35,10 +33,10 @@ aliases_typealiastype.py:62: error: Invalid type: try using Literal[1] instead?
3533
aliases_typealiastype.py:63: error: Invalid type alias: expression is not a valid type [valid-type]
3634
aliases_typealiastype.py:63: error: Function "list" could always be true in boolean context [truthy-function]
3735
aliases_typealiastype.py:64: error: Invalid type alias: expression is not a valid type [valid-type]
36+
aliases_typealiastype.py:66: error: Cannot resolve name "BadAlias21" (possible cyclic definition) [misc]
3837
"""
3938
conformance_automated = "Fail"
4039
errors_diff = """
41-
Line 19: Unexpected errors ['aliases_typealiastype.py:19: error: Cannot resolve name "GoodAlias4" (possible cyclic definition) [misc]']
4240
Line 20: Unexpected errors ['aliases_typealiastype.py:20: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]']
4341
Line 22: Unexpected errors ['aliases_typealiastype.py:22: error: Cannot resolve name "GoodAlias5" (possible cyclic definition) [misc]']
4442
Line 27: Unexpected errors ['aliases_typealiastype.py:27: error: Type variable "T" is not included in type_params [valid-type]']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.15.0"
2-
test_duration = 1.8
2+
test_duration = 2.0

conformance/results/pyright/aliases_typealiastype.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
incorrectly allows undefined self reference
4+
"""
25
output = """
36
aliases_typealiastype.py:32:18 - error: Cannot access attribute "other_attrib" for class "TypeAliasType"
47
  Attribute "other_attrib" is unknown (reportAttributeAccessIssue)
@@ -29,6 +32,7 @@ aliases_typealiastype.py:62:42 - error: Expected class but received "Literal[1]"
2932
aliases_typealiastype.py:63:42 - error: Binary operator not allowed in type expression (reportInvalidTypeForm)
3033
aliases_typealiastype.py:64:42 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues)
3134
"""
32-
conformance_automated = "Pass"
35+
conformance_automated = "Fail"
3336
errors_diff = """
37+
Line 66: Expected 1 errors
3438
"""

conformance/results/pyright/generics_type_erasure.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
no error for `type(n1).label`
4+
"""
25
output = """
36
generics_type_erasure.py:38:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"
47
  Type "Literal['']" is not assignable to type "int | None"
@@ -12,8 +15,8 @@ generics_type_erasure.py:42:11 - error: Access to generic instance variable thro
1215
generics_type_erasure.py:43:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
1316
generics_type_erasure.py:44:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
1417
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)
1618
"""
17-
conformance_automated = "Pass"
19+
conformance_automated = "Fail"
1820
errors_diff = """
21+
Line 46: Expected 1 errors
1922
"""
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "pyright 1.1.399"
2-
test_duration = 1.1
1+
version = "pyright 1.1.400"
2+
test_duration = 0.9

conformance/results/pytype/aliases_typealiastype.toml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,35 @@ aliases_typealiastype.py:16:14: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in
1818
GoodAlias1 = TypeAliasType("GoodAlias1", int)
1919
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
2020
21-
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]
2222
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,))
24+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
2525
26-
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]
2727
28-
Callable[P, TStr] | list[S] | list[GoodAlias5[S, TStr, P]] | tuple[*Ts],
29-
\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m
28+
Callable[P, TStr] | list[S] | list["GoodAlias5[S, TStr, P]"] | tuple[*Ts],
29+
\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m
3030
31-
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]
3232
33-
Callable[P, TStr] | list[S] | list[GoodAlias5[S, TStr, P]] | tuple[*Ts],
34-
\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m
33+
Callable[P, TStr] | list[S] | list["GoodAlias5[S, TStr, P]"] | tuple[*Ts],
34+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
3535
3636
aliases_typealiastype.py:32:7: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: No attribute 'other_attrib' on TypeAliasType [attribute-error]
3737
3838
print(GoodAlias1.other_attrib) # E: unknown attribute
3939
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
4040
41-
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]
4242
43-
BadAlias4 = TypeAliasType("BadAlias4", BadAlias4) # E: circular dependency
44-
\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m
43+
BadAlias5 = TypeAliasType("BadAlias5", T | "BadAlias5[str]", type_params=(T,)) # E: circular dependency
44+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
4545
46-
aliases_typealiastype.py:47:44: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Name 'BadAlias5' is not defined [name-error]
46+
aliases_typealiastype.py:66:47: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Name 'BadAlias21' is not defined [name-error]
4747
48-
BadAlias5 = TypeAliasType("BadAlias5", T | BadAlias5[str], type_params=(T,)) # E: circular dependency
49-
\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m
50-
51-
aliases_typealiastype.py:48:40: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Name 'BadAlias7' is not defined [name-error]
52-
53-
BadAlias6 = TypeAliasType("BadAlias6", BadAlias7) # E: circular dependency
54-
\u001b[1m\u001b[31m~~~~~~~~~\u001b[39m\u001b[0m
48+
BadAlias21 = TypeAliasType("BadAlias21", list[BadAlias21]) # E
49+
\u001b[1m\u001b[31m~~~~~~~~~~\u001b[39m\u001b[0m
5550
5651
"""
5752
conformance_automated = "Fail"
@@ -60,6 +55,8 @@ Line 40: Expected 1 errors
6055
Line 43: Expected 1 errors
6156
Line 44: Expected 1 errors
6257
Line 45: Expected 1 errors
58+
Line 46: Expected 1 errors
59+
Line 48: Expected 1 errors
6360
Line 52: Expected 1 errors
6461
Line 53: Expected 1 errors
6562
Line 54: Expected 1 errors
@@ -76,6 +73,6 @@ Line 64: Expected 1 errors
7673
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]']
7774
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]']
7875
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]"]
8178
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pytype 2024.10.11"
2-
test_duration = 31.3
2+
test_duration = 29.7

conformance/results/results.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ <h3>Python Type System Conformance Test Results</h3>
159159
<div class="table_container"><table><tbody>
160160
<tr><th class="col1">&nbsp;</th>
161161
<th class='tc-header'><div class='tc-name'>mypy 1.15.0</div>
162-
<div class='tc-time'>1.8sec</div>
162+
<div class='tc-time'>2.0sec</div>
163163
</th>
164-
<th class='tc-header'><div class='tc-name'>pyright 1.1.399</div>
165-
<div class='tc-time'>1.1sec</div>
164+
<th class='tc-header'><div class='tc-name'>pyright 1.1.400</div>
165+
<div class='tc-time'>0.9sec</div>
166166
</th>
167167
<th class='tc-header'><div class='tc-name'>pyre 0.9.23</div>
168-
<div class='tc-time'>9.0sec</div>
168+
<div class='tc-time'>0.6sec</div>
169169
</th>
170170
<th class='tc-header'><div class='tc-name'>pytype 2024.10.11</div>
171-
<div class='tc-time'>31.3sec</div>
171+
<div class='tc-time'>29.7sec</div>
172172
</th>
173173
</tr>
174174
<tr><th class="column" colspan="5">
@@ -356,7 +356,7 @@ <h3>Python Type System Conformance Test Results</h3>
356356
</tr>
357357
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_type_erasure</th>
358358
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="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-
<th class="column col2 conformant">Pass</th>
359+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>no error for `type(n1).label`</p></span></div></th>
360360
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="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>
361361
<th class="column col2 not-conformant">Unsupported</th>
362362
</tr>
@@ -491,7 +491,7 @@ <h3>Python Type System Conformance Test Results</h3>
491491
</tr>
492492
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aliases_typealiastype</th>
493493
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="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>
494-
<th class="column col2 conformant">Pass</th>
494+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>incorrectly allows undefined self reference</p></span></div></th>
495495
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Support for TypeAliasType is not implemented.</p></span></div></th>
496496
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Support for TypeAliasType is not implemented.</p></span></div></th>
497497
</tr>

conformance/src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def update_type_checker_info(
245245
def main():
246246
# Some tests cover features that are available only in the
247247
# latest version of Python (3.12), so we need this version.
248-
assert sys.version_info >= (3, 12)
248+
# assert sys.version_info >= (3, 12)
249249

250250
options = parse_options(sys.argv[1:])
251251

0 commit comments

Comments
 (0)