Skip to content

Commit e35ffb6

Browse files
authored
Update conformance results for mypy 1.17.0 and pyre 0.9.25. (#2055)
* Update conformance results for mypy 1.17.0 and pyre 0.9.25. I ran the conformance tests and noticed that the results have changed a bit for the latest versions of mypy and pyre. * Update manual conformance result. * Remove stale notes. * Rerun 'python main.py' after change to manual grading.
1 parent 2d88da2 commit e35ffb6

File tree

9 files changed

+20
-39
lines changed

9 files changed

+20
-39
lines changed

conformance/results/mypy/aliases_recursive.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ aliases_recursive.py:38: error: Incompatible types in assignment (expression has
66
aliases_recursive.py:39: error: Name "t6" already defined on line 38 [no-redef]
77
aliases_recursive.py:50: error: Dict entry 0 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]
88
aliases_recursive.py:51: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]
9-
aliases_recursive.py:52: error: Dict entry 2 has incompatible type "str": "list[int]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]
9+
aliases_recursive.py:52: error: Dict entry 2 has incompatible type "str": "dict[str, str | int | list[int]]"; expected "str": "str | int | Mapping[str, RecursiveMapping]" [dict-item]
1010
aliases_recursive.py:63: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias1[str] | str" [list-item]
1111
aliases_recursive.py:69: error: List item 0 has incompatible type "float"; expected "GenericTypeAlias2[str, int] | str | int" [list-item]
1212
aliases_recursive.py:72: error: Invalid recursive alias: a union item of itself [misc]

conformance/results/mypy/classes_classvar.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classes_classvar.py:70: error: ClassVar can only be used for assignments in clas
2020
classes_classvar.py:71: error: ClassVar can only be used for assignments in class body [misc]
2121
classes_classvar.py:73: error: ClassVar can only be used for assignments in class body [misc]
2222
classes_classvar.py:77: error: ClassVar can only be used for assignments in class body [misc]
23+
classes_classvar.py:78: error: ClassVar[...] can't be used inside a type alias [valid-type]
2324
classes_classvar.py:111: error: Cannot assign to class variable "stats" via instance [misc]
2425
classes_classvar.py:140: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") [assignment]
2526
classes_classvar.py:140: note: "ProtoAImpl" is missing following "ProtoA" protocol member:
@@ -30,6 +31,5 @@ classes_classvar.py:140: note: Protocol member ProtoA.y expected class variable,
3031
conformance_automated = "Fail"
3132
errors_diff = """
3233
Line 47: Expected 1 errors
33-
Line 78: Expected 1 errors
3434
Line 67: Unexpected errors ['classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type]']
3535
"""
Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
1-
conformant = "Partial"
2-
notes = """
3-
Incorrectly rejects kw_only field with default before positional field.
4-
"""
1+
conformant = "Pass"
52
output = """
63
dataclasses_kwonly.py:23: error: Too many positional arguments for "DC1" [misc]
7-
dataclasses_kwonly.py:29: error: Attributes without a default cannot follow attributes with one [misc]
8-
dataclasses_kwonly.py:32: error: Too many positional arguments for "DC2" [misc]
9-
dataclasses_kwonly.py:32: error: Too few arguments for "DC2" [call-arg]
10-
dataclasses_kwonly.py:32: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
11-
dataclasses_kwonly.py:35: error: "DC2" gets multiple values for keyword argument "b" [misc]
12-
dataclasses_kwonly.py:35: error: Too few arguments for "DC2" [call-arg]
13-
dataclasses_kwonly.py:35: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
144
dataclasses_kwonly.py:38: error: Too many positional arguments for "DC2" [misc]
15-
dataclasses_kwonly.py:38: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
16-
dataclasses_kwonly.py:38: error: Argument 2 to "DC2" has incompatible type "int"; expected "str" [arg-type]
175
dataclasses_kwonly.py:53: error: Too many positional arguments for "DC3" [misc]
186
"""
19-
conformance_automated = "Fail"
7+
conformance_automated = "Pass"
208
errors_diff = """
21-
Line 29: Unexpected errors ['dataclasses_kwonly.py:29: error: Attributes without a default cannot follow attributes with one [misc]']
22-
Line 32: Unexpected errors ['dataclasses_kwonly.py:32: error: Too many positional arguments for "DC2" [misc]', 'dataclasses_kwonly.py:32: error: Too few arguments for "DC2" [call-arg]', 'dataclasses_kwonly.py:32: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]']
23-
Line 35: Unexpected errors ['dataclasses_kwonly.py:35: error: "DC2" gets multiple values for keyword argument "b" [misc]', 'dataclasses_kwonly.py:35: error: Too few arguments for "DC2" [call-arg]', 'dataclasses_kwonly.py:35: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]']
249
"""

conformance/results/mypy/directives_reveal_type.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
conformant = "Pass"
22
output = """
3-
directives_reveal_type.py:14: note: Revealed type is "Union[builtins.int, builtins.str]"
3+
directives_reveal_type.py:14: note: Revealed type is "builtins.int | builtins.str"
44
directives_reveal_type.py:15: note: Revealed type is "builtins.list[builtins.int]"
55
directives_reveal_type.py:16: note: Revealed type is "Any"
66
directives_reveal_type.py:17: note: Revealed type is "directives_reveal_type.ForwardReference"

conformance/results/mypy/version.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "mypy 1.16.1"
2-
test_duration = 2.2
1+
version = "mypy 1.17.0"
2+
test_duration = 2.7

conformance/results/pyre/generics_paramspec_specialization.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ notes = """
33
Reports error for legitimate use of `...` to specialize ParamSpec
44
"""
55
output = """
6-
generics_paramspec_specialization.py:32:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P2`, but a single type `...` was given for generic type ClassB.
7-
generics_paramspec_specialization.py:36:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `...` was given for generic type ClassA.
86
generics_paramspec_specialization.py:44:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `int` was given for generic type ClassA.
97
generics_paramspec_specialization.py:53:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.
108
generics_paramspec_specialization.py:54:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.
@@ -15,8 +13,6 @@ generics_paramspec_specialization.py:61:4 Too many arguments [19]: PositionalOnl
1513
"""
1614
conformance_automated = "Fail"
1715
errors_diff = """
18-
Line 32: Unexpected errors ['generics_paramspec_specialization.py:32:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P2`, but a single type `...` was given for generic type ClassB.']
19-
Line 36: Unexpected errors ['generics_paramspec_specialization.py:36:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `...` was given for generic type ClassA.']
2016
Line 53: Unexpected errors ['generics_paramspec_specialization.py:53:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.']
2117
Line 59: Unexpected errors ['generics_paramspec_specialization.py:59:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.']
2218
"""

conformance/results/pyre/version.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "pyre 0.9.23"
2-
test_duration = 10.7
1+
version = "pyre 0.9.25"
2+
test_duration = 3.9
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "pyright 1.1.402"
2-
test_duration = 1.8
1+
version = "pyright 1.1.403"
2+
test_duration = 5.6

conformance/results/results.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ <h3>Python Type System Conformance Test Results</h3>
158158
</header>
159159
<div class="table_container"><table><tbody>
160160
<tr><th class="col1">&nbsp;</th>
161-
<th class='tc-header'><div class='tc-name'>mypy 1.16.1</div>
162-
<div class='tc-time'>2.2sec</div>
161+
<th class='tc-header'><div class='tc-name'>mypy 1.17.0</div>
162+
<div class='tc-time'>2.7sec</div>
163163
</th>
164-
<th class='tc-header'><div class='tc-name'>pyright 1.1.402</div>
165-
<div class='tc-time'>1.8sec</div>
164+
<th class='tc-header'><div class='tc-name'>pyright 1.1.403</div>
165+
<div class='tc-time'>5.6sec</div>
166166
</th>
167-
<th class='tc-header'><div class='tc-name'>pyre 0.9.23</div>
168-
<div class='tc-time'>10.7sec</div>
167+
<th class='tc-header'><div class='tc-name'>pyre 0.9.25</div>
168+
<div class='tc-time'>3.9sec</div>
169169
</th>
170170
</tr>
171171
<tr><th class="column" colspan="4">
@@ -324,7 +324,7 @@ <h3>Python Type System Conformance Test Results</h3>
324324
</tr>
325325
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_type_erasure</th>
326326
<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>
327-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Missing error regarding `type(instance).generic_attribute`.</p></span></div></th>
327+
<th class="column col2 conformant">Pass</th>
328328
<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>
329329
</tr>
330330
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_typevartuple_args</th>
@@ -423,7 +423,7 @@ <h3>Python Type System Conformance Test Results</h3>
423423
</tr>
424424
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aliases_newtype</th>
425425
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>`NewType`s are considered classes, not functions.</p></span></div></th>
426-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>`NewType`s are considered classes, not functions.</p></span></div></th>
426+
<th class="column col2 conformant">Pass</th>
427427
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject use of NewType in `isinstance` call.</p><p>Does not reject use of NewType in class definition statement.</p><p>Does not report inconsistency between name of NewType and assigned identifier name.</p><p>Does not reject use of NewType with generic class with TypeVar.</p><p>Does not reject use of NewType with protocol class.</p><p>Does not reject use of NewType with TypedDict class.</p><p>Does not reject use of NewType with Any.</p></span></div></th>
428428
</tr>
429429
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aliases_recursive</th>
@@ -648,7 +648,7 @@ <h3>Python Type System Conformance Test Results</h3>
648648
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject ClassVar that is overridden by instance variable.</p><p>Does not reject instance variable that is overridden by ClassVar.</p></span></div></th>
649649
</tr>
650650
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataclasses_kwonly</th>
651-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Incorrectly rejects kw_only field with default before positional field.</p></span></div></th>
651+
<th class="column col2 conformant">Pass</th>
652652
<th class="column col2 conformant">Pass</th>
653653
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Rejects legitimate use of dataclass field with `kw_only=True`.</p></span></div></th>
654654
</tr>

0 commit comments

Comments
 (0)