Skip to content

Commit 7cbb3f2

Browse files
authored
Updated conformance test results for pyright 1.1.366. (#1768)
This version fixes several conformance issues related to the recently added Enumerations chapter.
1 parent 11da23a commit 7cbb3f2

File tree

7 files changed

+15
-30
lines changed

7 files changed

+15
-30
lines changed

conformance/results/mypy/version.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.10.0"
2-
test_duration = 0.9
2+
test_duration = 1.5

conformance/results/pyre/version.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.21"
2-
test_duration = 2.6
2+
test_duration = 3.6
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
conformant = "Partial"
2-
notes = """
3-
Applies type narrowing incorrectly for `a is E` pattern where `E` is an enum member.
4-
5-
"""
6-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
73
errors_diff = """
8-
Line 78: Unexpected errors ['enums_expansion.py:78:12 - error: Expression of type "list[Never]" is incompatible with return type "list[Answer]"']
94
"""
105
output = """
116
enums_expansion.py:53:21 - error: "assert_type" mismatch: expected "Literal[CustomFlags.FLAG3]" but received "CustomFlags" (reportAssertTypeFailure)
12-
enums_expansion.py:78:12 - error: Expression of type "list[Never]" is incompatible with return type "list[Answer]"
13-
  "list[Never]" is incompatible with "list[Answer]"
14-
    Type parameter "_T@list" is invariant, but "Never" is not the same as "Answer"
15-
    Consider switching from "list" to "Sequence" which is covariant (reportReturnType)
167
"""

conformance/results/pyright/enums_members.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
conformant = "Partial"
1+
conformant = "Pass"
22
notes = """
3-
Does not reject use of annotation with enum member.
4-
Does not treat annotated attributes as non-members in stub.
53
Does not support `_ignore_` mechanism (optional).
64
"""
7-
conformance_automated = "Fail"
5+
conformance_automated = "Pass"
86
errors_diff = """
9-
Line 46: Expected 1 errors
10-
Line 31: Unexpected errors ['enums_members.py:31:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.genus]" (reportAssertTypeFailure)']
11-
Line 32: Unexpected errors ['enums_members.py:32:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.species]" (reportAssertTypeFailure)']
127
"""
138
output = """
14-
enums_members.py:31:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.genus]" (reportAssertTypeFailure)
15-
enums_members.py:32:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.species]" (reportAssertTypeFailure)
9+
enums_members.py:46:5 - error: Type annotations are not allowed for enum members (reportGeneralTypeIssues)
1610
enums_members.py:78:13 - error: "assert_type" mismatch: expected "Unknown" but received "(x: Unknown) -> str" (reportAssertTypeFailure)
1711
enums_members.py:78:37 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value
1812
enums_members.py:79:13 - error: "assert_type" mismatch: expected "Unknown" but received "(x: int) -> int" (reportAssertTypeFailure)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "pyright 1.1.365"
1+
version = "pyright 1.1.366"
22
test_duration = 1.4
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pytype 2024.04.11"
2-
test_duration = 29.9
2+
test_duration = 32.9

conformance/results/results.html

Lines changed: 6 additions & 6 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.10.0</div>
162-
<div class='tc-time'>0.9sec</div>
162+
<div class='tc-time'>1.5sec</div>
163163
</th>
164-
<th class='tc-header'><div class='tc-name'>pyright 1.1.365</div>
164+
<th class='tc-header'><div class='tc-name'>pyright 1.1.366</div>
165165
<div class='tc-time'>1.4sec</div>
166166
</th>
167167
<th class='tc-header'><div class='tc-name'>pyre 0.9.21</div>
168-
<div class='tc-time'>2.6sec</div>
168+
<div class='tc-time'>3.6sec</div>
169169
</th>
170170
<th class='tc-header'><div class='tc-name'>pytype 2024.04.11</div>
171-
<div class='tc-time'>29.9sec</div>
171+
<div class='tc-time'>32.9sec</div>
172172
</th>
173173
</tr>
174174
<tr><th class="column" colspan="5">
@@ -914,7 +914,7 @@ <h3>Python Type System Conformance Test Results</h3>
914914
</tr>
915915
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enums_expansion</th>
916916
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Improperly applies narrowing to Flag subclass.</p></span></div></th>
917-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Applies type narrowing incorrectly for `a is E` pattern where `E` is an enum member.</p></span></div></th>
917+
<th class="column col2 conformant">Pass</th>
918918
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not perform type narrowing based on enum literal expansion (optional).</p></span></div></th>
919919
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Improperly applies narrowing to Flag subclass.</p></span></div></th>
920920
</tr>
@@ -932,7 +932,7 @@ <h3>Python Type System Conformance Test Results</h3>
932932
</tr>
933933
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enums_members</th>
934934
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not treat attribute with annotation and no assignment as non-member.</p><p>Does not reject use of annotation with enum member.</p><p>Does not treat callables as non-members.</p><p>Does not honor `enum.nonmember` to define non-member attribute.</p><p>Does not honor `enum.member` as method decorator.</p><p>Does not properly handle aliased enum members.</p><p>Does not support `_ignore_` mechanism (optional).</p></span></div></th>
935-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject use of annotation with enum member.</p><p>Does not treat annotated attributes as non-members in stub.</p><p>Does not support `_ignore_` mechanism (optional).</p></span></div></th>
935+
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not support `_ignore_` mechanism (optional).</p></span></div></th>
936936
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject use of annotation with enum member.</p><p>Does not treat callables as non-members.</p><p>Does not treat annotated attributes as non-members.</p><p>Does not honor `enum.nonmember` to define non-member attribute.</p><p>Does not honor `enum.member` as method decorator.</p><p>Does not properly handle aliased enum members.</p><p>Rejects use of `_ignore_`.</p><p>Does not support `_ignore_` mechanism (optional).</p></span></div></th>
937937
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject use of annotation with enum member.</p><p>Does not support `enum.member` and `enum.nonmember`.</p><p>Does not support `_ignore_` mechanism (optional).</p></span></div></th>
938938
</tr>

0 commit comments

Comments
 (0)