Skip to content

Commit b2d9173

Browse files
authored
Updated conformance results for pyright 1.1.361. (#1730)
Updated conformance results for pyright 1.1.361. The tests found a regression that was introduced in this version related to the `TypeIs` special form. All other changes are due to minor tweaks in error messages.
1 parent e4643cb commit b2d9173

File tree

9 files changed

+26
-19
lines changed

9 files changed

+26
-19
lines changed
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 = 1.5
2+
test_duration = 1.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.19"
2-
test_duration = 4.2
2+
test_duration = 3.7

conformance/results/pyright/aliases_recursive.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ aliases_recursive.py:52:24 - error: Expression of type "dict[str, str | int | di
5454
      Type parameter "_VT_co@Mapping" is covariant, but "str | int | dict[str, str | int | list[int]]" is not a subtype of "RecursiveMapping" (reportAssignmentType)
5555
aliases_recursive.py:63:38 - error: Expression of type "list[str | list[float]]" is incompatible with declared type "GenericTypeAlias1[str]"
5656
  Type "float" is incompatible with type "GenericTypeAlias1[T1@GenericTypeAlias1] | str"
57-
    "float" is incompatible with "GenericTypeAlias1[T1@GenericTypeAlias1]"
57+
    "float" is incompatible with "list[GenericTypeAlias1 | str]"
5858
    "float" is incompatible with "str" (reportAssignmentType)
5959
aliases_recursive.py:69:51 - error: Expression of type "list[list[int | list[str | int | list[float]]] | str]" is incompatible with declared type "GenericTypeAlias2[str, int]"
6060
  Type "float" is incompatible with type "GenericTypeAlias2[T1@GenericTypeAlias2, T2@GenericTypeAlias2] | str | int"
61-
    "float" is incompatible with "GenericTypeAlias2[T1@GenericTypeAlias2, T2@GenericTypeAlias2]"
61+
    "float" is incompatible with "list[GenericTypeAlias2 | str | int]"
6262
    "float" is incompatible with "str"
6363
    "float" is incompatible with "int" (reportAssignmentType)
6464
aliases_recursive.py:72:29 - error: Type alias "RecursiveUnion" cannot use itself in its definition (reportGeneralTypeIssues)

conformance/results/pyright/generics_typevartuple_specialization.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ conformant = "Pass"
22
output = """
33
generics_typevartuple_specialization.py:109:18 - error: Type variable "Ts" has no meaning in this context (reportGeneralTypeIssues)
44
generics_typevartuple_specialization.py:109:18 - error: Could not specialize type "IntTupleGeneric[T@IntTupleGeneric]"
5-
  Unpacked arguments cannot be used in type argument lists
5+
  Unpacked arguments cannot be used in this context
66
generics_typevartuple_specialization.py:110:18 - error: Could not specialize type "IntTupleGeneric[T@IntTupleGeneric]"
7-
  Unpacked arguments cannot be used in type argument lists
7+
  Unpacked arguments cannot be used in this context
88
generics_typevartuple_specialization.py:121:27 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple
99
generics_typevartuple_specialization.py:122:27 - error: Type argument list can have at most one unpacked TypeVarTuple or tuple
1010
generics_typevartuple_specialization.py:127:9 - error: Too few type arguments provided for "TA7[*Ts@TA7, T1@TA7, T2@TA7]"; expected 3 but received 2
1111
generics_typevartuple_specialization.py:163:14 - error: Could not specialize type "TA11[T@TA11, *Ts1@TA11]"
12-
  Unpacked arguments cannot be used in type argument lists
12+
  Unpacked arguments cannot be used in this context
1313
"""
1414
conformance_automated = "Pass"
1515
errors_diff = """

conformance/results/pyright/namedtuples_define_class.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ namedtuples_define_class.py:32:7 - error: Index 3 is out of range for type Point
44
namedtuples_define_class.py:33:7 - error: Index -4 is out of range for type Point (reportGeneralTypeIssues)
55
namedtuples_define_class.py:44:6 - error: Argument missing for parameter "y" (reportCallIssue)
66
namedtuples_define_class.py:45:6 - error: Argument missing for parameter "y" (reportCallIssue)
7-
namedtuples_define_class.py:46:15 - error: Argument of type "Literal['']" cannot be assigned to parameter "y" of type "int" in function "__init__"
7+
namedtuples_define_class.py:46:15 - error: Argument of type "Literal['']" cannot be assigned to parameter "y" of type "int" in function "__new__"
88
  "Literal['']" is incompatible with "int" (reportArgumentType)
9-
namedtuples_define_class.py:47:24 - error: Argument of type "Literal[3]" cannot be assigned to parameter "units" of type "str" in function "__init__"
9+
namedtuples_define_class.py:47:24 - error: Argument of type "Literal[3]" cannot be assigned to parameter "units" of type "str" in function "__new__"
1010
  "Literal[3]" is incompatible with "str" (reportArgumentType)
1111
namedtuples_define_class.py:48:22 - error: Expected 3 positional arguments (reportCallIssue)
1212
namedtuples_define_class.py:49:23 - error: No parameter named "other" (reportCallIssue)
1313
namedtuples_define_class.py:59:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues)
1414
namedtuples_define_class.py:79:5 - error: Cannot override "x" because parent class "Point" is a named tuple (reportIncompatibleVariableOverride)
15-
namedtuples_define_class.py:98:19 - error: Argument of type "float" cannot be assigned to parameter "value" of type "str" in function "__init__"
15+
namedtuples_define_class.py:98:19 - error: Argument of type "float" cannot be assigned to parameter "value" of type "str" in function "__new__"
1616
  "float" is incompatible with "str" (reportArgumentType)
1717
namedtuples_define_class.py:105:7 - error: Multiple inheritance with NamedTuple is not supported (reportGeneralTypeIssues)
1818
"""

conformance/results/pyright/narrowing_typeis.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
conformant = "Pass"
2-
conformance_automated = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Does not correctly narrow types in negative (else) case.
4+
"""
5+
conformance_automated = "Fail"
36
errors_diff = """
7+
Line 19: Unexpected errors ['narrowing_typeis.py:19:21 - error: "assert_type" mismatch: expected "tuple[str, str]" but received "tuple[str, ...]" (reportAssertTypeFailure)']
8+
Line 38: Unexpected errors ['narrowing_typeis.py:38:21 - error: "assert_type" mismatch: expected "int" but received "int | Awaitable[int]" (reportAssertTypeFailure)']
49
"""
510
output = """
11+
narrowing_typeis.py:19:21 - error: "assert_type" mismatch: expected "tuple[str, str]" but received "tuple[str, ...]" (reportAssertTypeFailure)
12+
narrowing_typeis.py:38:21 - error: "assert_type" mismatch: expected "int" but received "int | Awaitable[int]" (reportAssertTypeFailure)
613
narrowing_typeis.py:105:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues)
714
narrowing_typeis.py:110:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues)
815
narrowing_typeis.py:132:20 - error: Argument of type "(val: object) -> TypeIs[int]" cannot be assigned to parameter "f" of type "(object) -> str" in function "takes_callable_str"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "pyright 1.1.360"
1+
version = "pyright 1.1.361"
22
test_duration = 1.6
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 = 34.4
2+
test_duration = 35.5

conformance/results/results.html

Lines changed: 5 additions & 5 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'>1.5sec</div>
162+
<div class='tc-time'>1.3sec</div>
163163
</th>
164-
<th class='tc-header'><div class='tc-name'>pyright 1.1.360</div>
164+
<th class='tc-header'><div class='tc-name'>pyright 1.1.361</div>
165165
<div class='tc-time'>1.6sec</div>
166166
</th>
167167
<th class='tc-header'><div class='tc-name'>pyre 0.9.19</div>
168-
<div class='tc-time'>4.2sec</div>
168+
<div class='tc-time'>3.7sec</div>
169169
</th>
170170
<th class='tc-header'><div class='tc-name'>pytype 2024.04.11</div>
171-
<div class='tc-time'>34.4sec</div>
171+
<div class='tc-time'>35.5sec</div>
172172
</th>
173173
</tr>
174174
<tr><th class="column" colspan="5">
@@ -896,7 +896,7 @@ <h3>Python Type System Conformance Test Results</h3>
896896
</tr>
897897
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;narrowing_typeis</th>
898898
<th class="column col2 conformant">Pass</th>
899-
<th class="column col2 conformant">Pass</th>
899+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not correctly narrow types in negative (else) case.</p></span></div></th>
900900
<th class="column col2 not-conformant">Unsupported</th>
901901
<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>
902902
</tr>

0 commit comments

Comments
 (0)