Skip to content

Commit

Permalink
Updated conformance tests for pytype 2024.04.11. Fixed a couple of mi…
Browse files Browse the repository at this point in the history
…nor consistency issues in notes.
  • Loading branch information
erictraut committed Apr 12, 2024
1 parent 30283a1 commit 1c1d12f
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion conformance/results/mypy/directives_no_type_check.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
conformant = "Partial"
notes = """
Does not honor `@no_type_check` class decorator.
Does not honor `@no_type_check` class decorator (allowed).
Does not reject invalid call of `@no_type_check` function.
"""
output = """
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/mypy/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "mypy 1.9.0"
test_duration = 2.2
test_duration = 1.4
2 changes: 1 addition & 1 deletion conformance/results/pyright/directives_no_type_check.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
conformant = "Pass"
notes = """
Does not honor `@no_type_check` class decorator.
Does not honor `@no_type_check` class decorator (allowed).
"""
output = """
directives_no_type_check.py:15:14 - error: Expression of type "Literal['']" cannot be assigned to declared type "int"
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/pyright/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pyright 1.1.358"
test_duration = 1.6
test_duration = 1.5
5 changes: 2 additions & 3 deletions conformance/results/pytype/annotations_coroutines.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ notes = """
Does not evaluate correct type for async function.
"""
output = """
File "annotations_coroutines.py", line 19, in <module>: Callable[[int], str] [assert-type]
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 19: Unexpected errors ['File "annotations_coroutines.py", line 19, in <module>: Callable[[int], str] [assert-type]']
"""
2 changes: 0 additions & 2 deletions conformance/results/pytype/annotations_generators.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ File "annotations_generators.py", line 100, in <module>: Bad return type 'IntIte
File "annotations_generators.py", line 109, in <module>: Bad return type 'AsyncIntIterator' for async generator function generator16 [bad-yield-annotation]
File "annotations_generators.py", line 118, in generator18: bad return type [bad-return-type]
File "annotations_generators.py", line 119, in generator18: bad return type [bad-return-type]
File "annotations_generators.py", line 182, in <module>: Callable[[], AsyncIterator[int]] [assert-type]
"""
conformance_automated = "Fail"
errors_diff = """
Expand All @@ -26,5 +25,4 @@ Line 92: Expected 1 errors
Line 135: Expected 1 errors
Line 100: Unexpected errors ['File "annotations_generators.py", line 100, in <module>: Bad return type \\'IntIterator\\' for generator function generator15 [bad-yield-annotation]']
Line 109: Unexpected errors ['File "annotations_generators.py", line 109, in <module>: Bad return type \\'AsyncIntIterator\\' for async generator function generator16 [bad-yield-annotation]']
Line 182: Unexpected errors ['File "annotations_generators.py", line 182, in <module>: Callable[[], AsyncIterator[int]] [assert-type]']
"""
6 changes: 3 additions & 3 deletions conformance/results/pytype/narrowing_typeis.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
conformant = "Partial"
notes = """
Does not narrow correctly on generic tuple type
Does not reject covariant use of TypeIs
Does not reject TypeIs where return type is not consistent with input type due to variance
Does not narrow correctly on generic tuple type.
Does not reject covariant use of TypeIs.
Does not reject TypeIs where return type is not consistent with input type due to variance.
"""
output = """
File "narrowing_typeis.py", line 19, in func1: Tuple[str, ...] [assert-type]
Expand Down
4 changes: 2 additions & 2 deletions conformance/results/pytype/version.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "pytype 2024.03.19"
test_duration = 44.2
version = "pytype 2024.04.11"
test_duration = 33.2
14 changes: 7 additions & 7 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ <h3>Python Type System Conformance Test Results</h3>
<div class="table_container"><table><tbody>
<tr><th class="col1">&nbsp;</th>
<th class='tc-header'><div class='tc-name'>mypy 1.9.0</div>
<div class='tc-time'>2.2sec</div>
<div class='tc-time'>1.4sec</div>
</th>
<th class='tc-header'><div class='tc-name'>pyright 1.1.358</div>
<div class='tc-time'>1.6sec</div>
<div class='tc-time'>1.5sec</div>
</th>
<th class='tc-header'><div class='tc-name'>pyre 0.9.19</div>
<div class='tc-time'>3.7sec</div>
</th>
<th class='tc-header'><div class='tc-name'>pytype 2024.03.19</div>
<div class='tc-time'>44.2sec</div>
<th class='tc-header'><div class='tc-name'>pytype 2024.04.11</div>
<div class='tc-time'>33.2sec</div>
</th>
</tr>
<tr><th class="column" colspan="5">
Expand Down Expand Up @@ -850,7 +850,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not narrow correctly on generic tuple type</p><p>Does not reject covariant use of TypeIs</p><p>Does not reject TypeIs where return type is not consistent with input type due to variance</p></span></div></th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not narrow correctly on generic tuple type.</p><p>Does not reject covariant use of TypeIs.</p><p>Does not reject TypeIs where return type is not consistent with input type due to variance.</p></span></div></th>
</tr>
<tr><th class="column" colspan="5">
<a class="test_group" href="https://typing.readthedocs.io/en/latest/spec/directives.html">Type checker directives</a>
Expand All @@ -868,8 +868,8 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject a call to "cast" with additional arguments.</p></span></div></th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_no_type_check</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not honor `@no_type_check` class decorator.</p><p>Does not reject invalid call of `@no_type_check` function.</p></span></div></th>
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not honor `@no_type_check` class decorator.</p></span></div></th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not honor `@no_type_check` class decorator (allowed).</p><p>Does not reject invalid call of `@no_type_check` function.</p></span></div></th>
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not honor `@no_type_check` class decorator (allowed).</p></span></div></th>
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not honor @no_type_check decorator.</p></span></div></th>
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not honor @no_type_check decorator.</p></span></div></th>
</tr>
Expand Down

0 comments on commit 1c1d12f

Please sign in to comment.