Skip to content

Commit 88f58bd

Browse files
Bump type checkers (#2279)
1 parent 6483940 commit 88f58bd

23 files changed

Lines changed: 112 additions & 137 deletions

conformance/results/pyrefly/aliases_recursive.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ conformance_automated = "Pass"
33
errors_diff = """
44
"""
55
output = """
6-
ERROR aliases_recursive.py:19:12-29: `dict[str, complex | Json]` is not assignable to `dict[str, Json] | float | int | list[Json] | str | None` [bad-assignment]
7-
ERROR aliases_recursive.py:20:12-19: `list[complex | Json]` is not assignable to `dict[str, Json] | float | int | list[Json] | str | None` [bad-assignment]
6+
ERROR aliases_recursive.py:19:12-29: `dict[str, complex | int]` is not assignable to `dict[str, Json] | float | int | list[Json] | str | None` [bad-assignment]
7+
ERROR aliases_recursive.py:20:12-19: `list[complex | int]` is not assignable to `dict[str, Json] | float | int | list[Json] | str | None` [bad-assignment]
88
ERROR aliases_recursive.py:38:22-50: `tuple[Literal[1], tuple[Literal['1'], Literal[1]], tuple[Literal[1], tuple[Literal[1], list[int]]]]` is not assignable to `int | str | tuple[RecursiveTuple, ...]` [bad-assignment]
99
ERROR aliases_recursive.py:39:22-30: `tuple[Literal[1], list[int]]` is not assignable to `int | str | tuple[RecursiveTuple, ...]` [bad-assignment]
1010
ERROR aliases_recursive.py:50:24-34: `dict[str, list[int]]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
11-
ERROR aliases_recursive.py:51:24-55: `dict[str, list[int] | RecursiveMapping]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
12-
ERROR aliases_recursive.py:52:24-83: `dict[str, dict[str, list[int] | RecursiveMapping] | RecursiveMapping]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
13-
ERROR aliases_recursive.py:63:30-43: `list[list[float] | str | GenericTypeAlias1[str]]` is not assignable to `list[str | GenericTypeAlias1[str]]` [bad-assignment]
14-
ERROR aliases_recursive.py:69:35-64: `list[int | list[int | list[int | list[float] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]]` is not assignable to `list[int | str | GenericTypeAlias2[str, int]]` [bad-assignment]
11+
ERROR aliases_recursive.py:51:24-55: `dict[str, int | list[int] | str]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
12+
ERROR aliases_recursive.py:52:24-83: `dict[str, dict[str, int | list[int] | str] | int | str]` is not assignable to `Mapping[str, RecursiveMapping] | int | str` [bad-assignment]
13+
ERROR aliases_recursive.py:63:30-43: `list[list[float] | str]` is not assignable to `list[str | GenericTypeAlias1[str]]` [bad-assignment]
14+
ERROR aliases_recursive.py:69:35-64: `list[list[int | list[int | list[float] | str]] | str]` is not assignable to `list[int | str | GenericTypeAlias2[str, int]]` [bad-assignment]
1515
ERROR aliases_recursive.py:72:29-57: Found cyclic self-reference in `RecursiveUnion` [invalid-type-alias]
1616
ERROR aliases_recursive.py:75:31-61: Found cyclic self-reference in `MutualReference1` [invalid-type-alias]
1717
ERROR aliases_recursive.py:75:93-123: Found cyclic self-reference in `MutualReference2` [invalid-type-alias]

conformance/results/pyrefly/generics_basic.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
conformant = "Partial"
2-
notes = """
3-
Incorrectly rejects + between two AnyStr.
4-
Spurious error for constrained type var call.
5-
"""
6-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
72
errors_diff = """
8-
Line 44: Unexpected errors ['Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]']
93
"""
104
output = """
115
ERROR generics_basic.py:40:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]
126
ERROR generics_basic.py:41:15-16: Argument `str` is not assignable to parameter `y` with type `bytes` in function `concat` [bad-argument-type]
13-
ERROR generics_basic.py:44:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]
147
ERROR generics_basic.py:49:18-48: Expected at least 2 constraints in TypeVar `BadConstraint1`, got 1 [invalid-type-var]
158
ERROR generics_basic.py:55:53-60: Type variable bounds and constraints must be concrete [invalid-annotation]
169
ERROR generics_basic.py:69:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]

conformance/results/pyrefly/generics_typevartuple_basic.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ conformance_automated = "Pass"
33
errors_diff = """
44
"""
55
output = """
6-
ERROR generics_typevartuple_basic.py:42:34-43: Argument `Height` is not assignable to parameter `shape` with type `tuple[Height, Width]` in function `Array.__init__` [bad-argument-type]
7-
ERROR generics_typevartuple_basic.py:43:41-61: Argument `tuple[Batch, Width]` is not assignable to parameter `shape` with type `tuple[Batch, Height, Width]` in function `Array.__init__` [bad-argument-type]
8-
ERROR generics_typevartuple_basic.py:45:5-45: Argument `tuple[Time, Batch, Width, Height]` is not assignable to parameter `shape` with type `tuple[Time, Batch, Height, Width]` in function `Array.__init__` [bad-argument-type]
6+
ERROR generics_typevartuple_basic.py:42:34-43: Argument `Height` is not assignable to parameter `shape` with type `tuple[*@_]` in function `Array.__init__` [bad-argument-type]
7+
ERROR generics_typevartuple_basic.py:43:35-62: `Array[Batch, Width]` is not assignable to `Array[Batch, Height, Width]` [bad-assignment]
8+
ERROR generics_typevartuple_basic.py:44:41-46:2: `Array[Time, Batch, Width, Height]` is not assignable to `Array[Time, Batch, Height, Width]` [bad-assignment]
99
ERROR generics_typevartuple_basic.py:52:22-27: `TypeVarTuple` must be unpacked [invalid-annotation]
1010
ERROR generics_typevartuple_basic.py:53:37-42: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]
1111
ERROR generics_typevartuple_basic.py:56:34-39: `TypeVarTuple` must be unpacked [invalid-type-var-tuple]

conformance/results/pyrefly/literals_literalstring.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ERROR literals_literalstring.py:65:25-45: `str` is not assignable to `LiteralStr
1010
ERROR literals_literalstring.py:73:25-26: `Literal[3]` is not assignable to `LiteralString` [bad-assignment]
1111
ERROR literals_literalstring.py:74:25-32: `Literal[b'test']` is not assignable to `LiteralString` [bad-assignment]
1212
ERROR literals_literalstring.py:119:21-24: `str` is not assignable to upper bound `LiteralString` of type variable `TLiteral` [bad-specialization]
13-
ERROR literals_literalstring.py:133:51-52: Argument `str` is not assignable to parameter `value` with type `LiteralString` in function `Container.__init__` [bad-argument-type]
13+
ERROR literals_literalstring.py:133:41-53: `Container[str]` is not assignable to `Container[LiteralString]` [bad-assignment]
14+
ERROR literals_literalstring.py:133:50-53: `str` is not assignable to upper bound `LiteralString` of type variable `T` [bad-specialization]
1415
ERROR literals_literalstring.py:171:21-24: `list[LiteralString]` is not assignable to `list[str]` [bad-assignment]
1516
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "pyrefly 0.62.0"
1+
version = "pyrefly 0.63.1"

conformance/results/results.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ <h3>Python Type System Conformance Test Results</h3>
176176
</th>
177177
<th class='tc-header'><div class='tc-name'>pyright 1.1.409</div>
178178
</th>
179-
<th class='tc-header'><div class='tc-name'>zuban 0.7.0</div>
179+
<th class='tc-header'><div class='tc-name'>zuban 0.7.1</div>
180180
</th>
181-
<th class='tc-header'><div class='tc-name'>pyrefly 0.62.0</div>
181+
<th class='tc-header'><div class='tc-name'>pyrefly 0.63.1</div>
182182
</th>
183-
<th class='tc-header'><div class='tc-name'>ty 0.0.33</div>
183+
<th class='tc-header'><div class='tc-name'>ty 0.0.34</div>
184184
</th>
185185
</tr>
186186
<tr><th class="column" colspan="6">
@@ -283,15 +283,15 @@ <h3>Python Type System Conformance Test Results</h3>
283283
<th class="column col2 conformant">Pass</th>
284284
<th class="column col2 conformant">Pass</th>
285285
<th class="column col2 conformant">Pass</th>
286-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Incorrectly rejects + between two AnyStr.</p><p>Spurious error for constrained type var call.</p></span></div></th>
286+
<th class="column col2 conformant">Pass</th>
287287
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Incorrectly allows constrained type variables to be solved to a union of their constraints.</p></span></div></th>
288288
</tr>
289289
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_defaults</th>
290290
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not detect a TypeVar with a default used after a TypeVarTuple.</p><p>Does not fully support defaults on TypeVarTuple and ParamSpec.</p></span></div></th>
291291
<th class="column col2 conformant">Pass</th>
292292
<th class="column col2 conformant">Pass</th>
293293
<th class="column col2 conformant">Pass</th>
294-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not forbid a `TypeVar` immediately following a `TypeVarTuple` in a parameter list from having a default.</p><p>Does not support `TypeVarTuple`.</p><p>Does not fully support defaults for `ParamSpec`s.</p></span></div></th>
294+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not forbid a `TypeVar` immediately following a `TypeVarTuple` in a parameter list from having a default.</p><p>Does not support `TypeVarTuple`.</p></span></div></th>
295295
</tr>
296296
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_defaults_referential</th>
297297
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not correctly handle defaults referencing other TypeVars.</p></span></div></th>
@@ -396,7 +396,7 @@ <h3>Python Type System Conformance Test Results</h3>
396396
<th class="column col2 conformant">Pass</th>
397397
<th class="column col2 conformant">Pass</th>
398398
<th class="column col2 conformant">Pass</th>
399-
<th class="column col2 not-conformant">Unsupported</th>
399+
<th class="column col2 conformant">Pass</th>
400400
</tr>
401401
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_syntax_scoping</th>
402402
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not following runtime scoping rules for type parameters in all cases.</p></span></div></th>
@@ -1170,7 +1170,7 @@ <h3>Python Type System Conformance Test Results</h3>
11701170
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directives_disjoint_base</th>
11711171
<th class="column col2 conformant">Pass</th>
11721172
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Does not support PEP 800 disjoint-base semantics.</p></span></div></th>
1173-
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Does not support PEP 800 disjoint-base semantics.</p></span></div></th>
1173+
<th class="column col2 conformant">Pass</th>
11741174
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Does not support PEP 800 disjoint-base semantics.</p></span></div></th>
11751175
<th class="column col2 conformant">Pass</th>
11761176
</tr>

conformance/results/ty/generics_defaults.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ conformant = "Partial"
33
notes = """
44
Does not forbid a `TypeVar` immediately following a `TypeVarTuple` in a parameter list from having a default.
55
Does not support `TypeVarTuple`.
6-
Does not fully support defaults for `ParamSpec`s.
76
"""
87
errors_diff = """
98
Line 188: Expected 1 errors
10-
Line 122: Unexpected errors ['generics_defaults.py:122:5: error[type-assertion-failure] Type `(**DefaultP@Class_ParamSpec) -> None` does not match asserted type `(str, int, /) -> None`']
119
Line 139: Unexpected errors ['generics_defaults.py:139:5: error[type-assertion-failure] Type `tuple[@Todo(TypeVarTuple), ...]` does not match asserted type `tuple[str, int]`']
1210
Line 140: Unexpected errors ['generics_defaults.py:140:5: error[type-assertion-failure] Type `Class_TypeVarTuple` does not match asserted type `@Todo`']
1311
Line 200: Unexpected errors ['generics_defaults.py:200:17: error[invalid-type-form] The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...`']
@@ -19,7 +17,6 @@ Line 208: Unexpected errors ['generics_defaults.py:208:5: error[type-assertion-f
1917
output = """
2018
generics_defaults.py:24:40: error[invalid-generic-class] Type parameter `T` without a default cannot follow earlier parameter `DefaultStrT` with a default
2119
generics_defaults.py:66:8: error[invalid-type-arguments] No type argument provided for required type variable `T2` of class `AllTheDefaults`
22-
generics_defaults.py:122:5: error[type-assertion-failure] Type `(**DefaultP@Class_ParamSpec) -> None` does not match asserted type `(str, int, /) -> None`
2320
generics_defaults.py:139:5: error[type-assertion-failure] Type `tuple[@Todo(TypeVarTuple), ...]` does not match asserted type `tuple[str, int]`
2421
generics_defaults.py:140:5: error[type-assertion-failure] Type `Class_TypeVarTuple` does not match asserted type `@Todo`
2522
generics_defaults.py:152:51: error[invalid-type-variable-default] TypeVar default is not assignable to the TypeVar's upper bound
Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
conformance_automated = "Fail"
2-
conformant = "Unsupported"
1+
conformance_automated = "Pass"
32
errors_diff = """
4-
Line 15: Expected 1 errors
5-
Line 17: Expected 1 errors
6-
Line 28: Unexpected errors ['generics_syntax_infer_variance.py:28:37: error[invalid-assignment] Object of type `ShouldBeCovariant1[int]` is not assignable to `ShouldBeCovariant1[int | float]`']
7-
Line 46: Unexpected errors ['generics_syntax_infer_variance.py:46:37: error[invalid-assignment] Object of type `ShouldBeCovariant2[int]` is not assignable to `ShouldBeCovariant2[int | float]`']
8-
Line 55: Unexpected errors ['generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of type `ShouldBeCovariant3[int]` is not assignable to `ShouldBeCovariant3[int | float]`']
9-
Line 84: Unexpected errors ['generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[int | float]`']
10-
Line 95: Unexpected errors ['generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[int | float]`']
11-
Line 166: Unexpected errors ['generics_syntax_infer_variance.py:166:43: error[invalid-assignment] Object of type `ShouldBeContravariant1[int | float]` is not assignable to `ShouldBeContravariant1[int]`']
123
"""
134
output = """
14-
generics_syntax_infer_variance.py:28:37: error[invalid-assignment] Object of type `ShouldBeCovariant1[int]` is not assignable to `ShouldBeCovariant1[int | float]`
5+
generics_syntax_infer_variance.py:15:6: error[invalid-legacy-type-variable] A `TypeVar` cannot specify variance when `infer_variance=True`
6+
generics_syntax_infer_variance.py:17:6: error[invalid-legacy-type-variable] A `TypeVar` cannot specify variance when `infer_variance=True`
157
generics_syntax_infer_variance.py:29:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[int | float]` is not assignable to `ShouldBeCovariant1[int]`
16-
generics_syntax_infer_variance.py:46:37: error[invalid-assignment] Object of type `ShouldBeCovariant2[int]` is not assignable to `ShouldBeCovariant2[int | float]`
178
generics_syntax_infer_variance.py:47:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[int | float]` is not assignable to `ShouldBeCovariant2[int]`
18-
generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of type `ShouldBeCovariant3[int]` is not assignable to `ShouldBeCovariant3[int | float]`
199
generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[int | float]` is not assignable to `ShouldBeCovariant3[int]`
20-
generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[int | float]`
2110
generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[int | float]` is not assignable to `ShouldBeCovariant5[int]`
22-
generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[int | float]`
2311
generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[int | float]` is not assignable to `ShouldBeCovariant6[int]`
2412
generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[int | float]`
2513
generics_syntax_infer_variance.py:113:36: error[invalid-assignment] Object of type `ShouldBeInvariant1[int | float]` is not assignable to `ShouldBeInvariant1[int]`
@@ -32,5 +20,4 @@ generics_syntax_infer_variance.py:138:41: error[invalid-assignment] Object of ty
3220
generics_syntax_infer_variance.py:146:38: error[invalid-assignment] Object of type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[int | float]`
3321
generics_syntax_infer_variance.py:154:38: error[invalid-assignment] Object of type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[int | float]`
3422
generics_syntax_infer_variance.py:165:45: error[invalid-assignment] Object of type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[int | float]`
35-
generics_syntax_infer_variance.py:166:43: error[invalid-assignment] Object of type `ShouldBeContravariant1[int | float]` is not assignable to `ShouldBeContravariant1[int]`
3623
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "ty 0.0.33"
1+
version = "ty 0.0.34"

conformance/results/zuban/callables_annotation.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ callables_annotation.py:57: error: Bracketed expression "[...]" is not valid as
1515
callables_annotation.py:57: note: Did you mean "List[...]"?
1616
callables_annotation.py:58: error: Please use "Callable[[<parameters>], <return type>]" or "Callable" [misc]
1717
callables_annotation.py:59: error: Unexpected "..." [valid-type]
18-
callables_annotation.py:91: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") [assignment]
19-
callables_annotation.py:93: error: Incompatible types in assignment (expression has type "Callable[[NamedArg(int, 'a')], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") [assignment]
18+
callables_annotation.py:91: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "def (int, /, *Any, **Any) -> str") [assignment]
19+
callables_annotation.py:93: error: Incompatible types in assignment (expression has type "def test_cb4(*, a: int) -> str", variable has type "def (int, /, *Any, **Any) -> str") [assignment]
2020
callables_annotation.py:159: error: Incompatible types in assignment (expression has type "Proto8", variable has type "Proto5[Any]") [assignment]
2121
callables_annotation.py:159: note: Following member(s) of "Proto8" have conflicts:
2222
callables_annotation.py:159: note: Expected:
2323
callables_annotation.py:159: note: def __call__(self, *args: Any, **kwargs: Any) -> None
2424
callables_annotation.py:159: note: Got:
2525
callables_annotation.py:159: note: def __call__(self) -> None
26-
callables_annotation.py:172: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "Callable[[int, VarArg(Any), KwArg(Any)], str]") [assignment]
27-
callables_annotation.py:187: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "Callable[[str, VarArg(Any), KwArg(Any)], str]") [assignment]
28-
callables_annotation.py:189: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "Callable[[str, VarArg(Any), KwArg(Any)], str]") [assignment]
26+
callables_annotation.py:172: error: Incompatible types in assignment (expression has type "Callable[[], str]", variable has type "def (int, /, *Any, **Any) -> str") [assignment]
27+
callables_annotation.py:187: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "def (str, /, *Any, **Any) -> str") [assignment]
28+
callables_annotation.py:189: error: Incompatible types in assignment (expression has type "Callable[[int, str], str]", variable has type "def (str, /, *Any, **Any) -> str") [assignment]
2929
"""

0 commit comments

Comments
 (0)