You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: conformance/results/pyright/aliases_recursive.toml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -54,11 +54,11 @@ aliases_recursive.py:52:24 - error: Expression of type "dict[str, str | int | di
54
54
Type parameter "_VT_co@Mapping" is covariant, but "str | int | dict[str, str | int | list[int]]" is not a subtype of "RecursiveMapping" (reportAssignmentType)
55
55
aliases_recursive.py:63:38 - error: Expression of type "list[str | list[float]]" is incompatible with declared type "GenericTypeAlias1[str]"
56
56
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]"
58
58
"float" is incompatible with "str" (reportAssignmentType)
59
59
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]"
60
60
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]"
62
62
"float" is incompatible with "str"
63
63
"float" is incompatible with "int" (reportAssignmentType)
64
64
aliases_recursive.py:72:29 - error: Type alias "RecursiveUnion" cannot use itself in its definition (reportGeneralTypeIssues)
Copy file name to clipboardExpand all lines: conformance/results/pyright/narrowing_typeis.toml
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff 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"
3
6
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)']
4
9
"""
5
10
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)
6
13
narrowing_typeis.py:105:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues)
7
14
narrowing_typeis.py:110:9 - error: User-defined type guard functions and methods must have at least one input parameter (reportGeneralTypeIssues)
8
15
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"
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
0 commit comments