Skip to content

Commit 68f0aa3

Browse files
committed
Update conformance results for newest type checker versions.
Updated pyrefly v1.0.0 -> v1.1.0 Updated pyright v1.1.409 -> v1.1.410 Updated ty v0.0.48 -> v0.0.50 Updated zuban v0.7.2 -> v0.8.2 Pyrefly and ty pass more tests now.
1 parent 14698d2 commit 68f0aa3

24 files changed

Lines changed: 115 additions & 139 deletions

conformance/results/pyrefly/aliases_implicit.toml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not reject invalid syntax in implicit type aliases.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 106: Expected 1 errors
8-
Line 111: Expected 1 errors
9-
Line 112: Expected 1 errors
10-
Line 113: Expected 1 errors
11-
Line 117: Expected 1 errors
123
"""
134
output = """
145
ERROR aliases_implicit.py:76:9-28: `type[int | None]` is not subscriptable [unsupported-operation]
@@ -17,14 +8,26 @@ ERROR aliases_implicit.py:78:9-33: Expected 1 type argument for `GoodTypeAlias4`
178
ERROR aliases_implicit.py:79:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
189
ERROR aliases_implicit.py:80:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
1910
ERROR aliases_implicit.py:81:9-29: `str` is not assignable to upper bound `float` of type variable `TFloat` [bad-specialization]
11+
ERROR aliases_implicit.py:106:9-22: `BadTypeAlias1` is not a valid type alias: Function call cannot be used in annotations [invalid-annotation]
2012
ERROR aliases_implicit.py:107:9-22: Expected a type form, got instance of `list[type[int] | type[str]]` [not-a-type]
13+
ERROR aliases_implicit.py:107:9-22: `BadTypeAlias2` is not a valid type alias: List literal cannot be used in annotations [invalid-annotation]
2114
ERROR aliases_implicit.py:108:9-22: Expected a type form, got instance of `tuple[tuple[type[int], type[str]]]` [not-a-type]
15+
ERROR aliases_implicit.py:108:9-22: `BadTypeAlias3` is not a valid type alias: Tuple literal cannot be used in annotations [invalid-annotation]
2216
ERROR aliases_implicit.py:109:9-22: Expected a type form, got instance of `list[type[int]]` [not-a-type]
17+
ERROR aliases_implicit.py:109:9-22: `BadTypeAlias4` is not a valid type alias: List comprehension cannot be used in annotations [invalid-annotation]
2318
ERROR aliases_implicit.py:110:9-22: Expected a type form, got instance of `dict[str, str]` [not-a-type]
19+
ERROR aliases_implicit.py:110:9-22: `BadTypeAlias5` is not a valid type alias: Dict literal cannot be used in annotations [invalid-annotation]
20+
ERROR aliases_implicit.py:111:9-22: `BadTypeAlias6` is not a valid type alias: Function call cannot be used in annotations [invalid-annotation]
21+
ERROR aliases_implicit.py:112:9-22: `BadTypeAlias7` is not a valid type alias: Invalid subscript expression cannot be used in annotations [invalid-annotation]
22+
ERROR aliases_implicit.py:113:9-22: `BadTypeAlias8` is not a valid type alias: If expression cannot be used in annotations [invalid-annotation]
2423
ERROR aliases_implicit.py:114:9-22: Expected a type form, got instance of `Literal[3]` [not-a-type]
2524
ERROR aliases_implicit.py:115:10-24: Expected a type form, got instance of `Literal[True]` [not-a-type]
25+
ERROR aliases_implicit.py:115:10-24: `BadTypeAlias10` is not a valid type alias: Bool literal cannot be used in annotations [invalid-annotation]
2626
ERROR aliases_implicit.py:116:10-24: Expected a type form, got instance of `Literal[1]` [not-a-type]
27+
ERROR aliases_implicit.py:116:10-24: `BadTypeAlias11` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
28+
ERROR aliases_implicit.py:117:10-24: `BadTypeAlias12` is not a valid type alias: Boolean operation cannot be used in annotations [invalid-annotation]
2729
ERROR aliases_implicit.py:118:10-24: Expected a type form, got instance of `Literal['int']` [not-a-type]
30+
ERROR aliases_implicit.py:118:10-24: `BadTypeAlias13` is not a valid type alias: F-string cannot be used in annotations [invalid-annotation]
2831
ERROR aliases_implicit.py:119:10-24: Expected a type form, got instance of `Literal['int | str']` [not-a-type]
2932
ERROR aliases_implicit.py:133:6-20: Expected a callable, got `type[list[Unknown] | set[Unknown]]` [not-callable]
3033
ERROR aliases_implicit.py:135:5-24: `type[list[Unknown] | set[Unknown]]` is not subscriptable [unsupported-operation]

conformance/results/pyrefly/annotations_forward_refs.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Line 87: Unexpected errors ['Expected a type form, got instance of `(self: Self@
99
Line 96: Unexpected errors ['assert_type(Unknown, int) failed [assert-type]']
1010
"""
1111
output = """
12+
ERROR annotations_forward_refs.py:23:12-18: `ClassA` is uninitialized [unbound-name]
1213
ERROR annotations_forward_refs.py:24:7-21: `|` union syntax does not work with string literals [invalid-annotation]
1314
ERROR annotations_forward_refs.py:25:7-21: `|` union syntax does not work with string literals [invalid-annotation]
1415
ERROR annotations_forward_refs.py:41:10-50: Function call cannot be used in annotations [invalid-annotation]
@@ -20,6 +21,7 @@ ERROR annotations_forward_refs.py:46:10-26: Function call cannot be used in anno
2021
ERROR annotations_forward_refs.py:47:10-18: Invalid subscript expression cannot be used in annotations [invalid-annotation]
2122
ERROR annotations_forward_refs.py:48:10-31: If expression cannot be used in annotations [invalid-annotation]
2223
ERROR annotations_forward_refs.py:49:10-14: Expected a type form, got instance of `Literal[1]` [not-a-type]
24+
ERROR annotations_forward_refs.py:49:10-14: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
2325
ERROR annotations_forward_refs.py:50:11-15: Bool literal cannot be used in annotations [invalid-annotation]
2426
ERROR annotations_forward_refs.py:51:11-12: Number literal cannot be used in annotations [invalid-annotation]
2527
ERROR annotations_forward_refs.py:52:11-13: Unary operation cannot be used in annotations [invalid-annotation]

conformance/results/pyrefly/annotations_typeexpr.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ERROR annotations_typeexpr.py:93:9-24: Function call cannot be used in annotatio
1212
ERROR annotations_typeexpr.py:94:9-17: Invalid subscript expression cannot be used in annotations [invalid-annotation]
1313
ERROR annotations_typeexpr.py:95:9-30: If expression cannot be used in annotations [invalid-annotation]
1414
ERROR annotations_typeexpr.py:96:9-13: Expected a type form, got instance of `Literal[3]` [not-a-type]
15+
ERROR annotations_typeexpr.py:96:9-13: `var1` is not a valid type alias: Number literal cannot be used in annotations [invalid-annotation]
1516
ERROR annotations_typeexpr.py:97:10-14: Bool literal cannot be used in annotations [invalid-annotation]
1617
ERROR annotations_typeexpr.py:98:10-11: Number literal cannot be used in annotations [invalid-annotation]
1718
ERROR annotations_typeexpr.py:99:10-12: Unary operation cannot be used in annotations [invalid-annotation]

conformance/results/pyrefly/dataclasses_descriptors.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ conformance_automated = "Fail"
77
errors_diff = """
88
Line 32: Unexpected errors ['Cannot set field `y` to data descriptor `Desc1` with inconsistent types [bad-class-definition]']
99
Line 58: Unexpected errors ['Cannot set field `z` to non-data descriptor `Desc2` [bad-class-definition]']
10-
Line 61: Unexpected errors ['assert_type(Desc2[int], list[int]) failed [assert-type]']
11-
Line 62: Unexpected errors ['assert_type(Desc2[str], list[str]) failed [assert-type]']
12-
Line 66: Unexpected errors ['assert_type(Desc2[int], int) failed [assert-type]']
13-
Line 67: Unexpected errors ['assert_type(Desc2[str], str) failed [assert-type]']
1410
"""
1511
output = """
1612
ERROR dataclasses_descriptors.py:32:5-6: Cannot set field `y` to data descriptor `Desc1` with inconsistent types [bad-class-definition]
1713
ERROR dataclasses_descriptors.py:58:5-6: Cannot set field `z` to non-data descriptor `Desc2` [bad-class-definition]
18-
ERROR dataclasses_descriptors.py:61:12-30: assert_type(Desc2[int], list[int]) failed [assert-type]
19-
ERROR dataclasses_descriptors.py:62:12-30: assert_type(Desc2[str], list[str]) failed [assert-type]
20-
ERROR dataclasses_descriptors.py:66:12-24: assert_type(Desc2[int], int) failed [assert-type]
21-
ERROR dataclasses_descriptors.py:67:12-24: assert_type(Desc2[str], str) failed [assert-type]
2214
"""

conformance/results/pyrefly/dataclasses_usage.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ ERROR dataclasses_usage.py:89:14-40: `str` is not assignable to `int` [bad-assig
1414
ERROR dataclasses_usage.py:128:8-9: Expected 1 positional argument, got 2 in function `DC7.__init__` [bad-argument-count]
1515
ERROR dataclasses_usage.py:131:4-7: Missing argument `y` in function `DC8.__init__` [missing-argument]
1616
ERROR dataclasses_usage.py:180:6-7: Expected 0 positional arguments, got 1 in function `object.__init__` [bad-argument-count]
17+
ERROR dataclasses_usage.py:229:5-6: `y` is a dataclass field but has no type annotation [bad-class-definition]
1718
ERROR dataclasses_usage.py:246:12-13: Expected 2 positional arguments, got 3 in function `DC19.__init__` [bad-argument-count]
1819
"""
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
conformance_automated = "Fail"
2-
conformant = "Unsupported"
3-
notes = """
4-
Does not support PEP 800 disjoint-base semantics.
5-
"""
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 69: Expected 1 errors
8-
Line 73: Expected 1 errors
9-
Line 77: Expected 1 errors
10-
Line 118: Expected 1 errors
11-
Line 123: Expected 1 errors
12-
Line 60: Unexpected errors ['Named tuples do not support multiple inheritance [invalid-inheritance]']
133
"""
144
output = """
15-
ERROR directives_disjoint_base.py:60:7-18: Named tuples do not support multiple inheritance [invalid-inheritance]
16-
ERROR directives_disjoint_base.py:81:7-17: Named tuples do not support multiple inheritance [invalid-inheritance]
17-
ERROR directives_disjoint_base.py:105:7-24: Class `IncompatibleSlots` has multiple base classes with non-empty `__slots__` (`SlotBase1`, `SlotBase2`), which causes a TypeError at runtime [invalid-inheritance]
18-
ERROR directives_disjoint_base.py:113:1-15: `() -> None` is not assignable to upper bound `type[object]` of type variable `_TC` [bad-specialization]
5+
ERROR directives_disjoint_base.py:69:7-19: Class `LeftAndRight` inherits from incompatible disjoint bases `Left`, `Right` [invalid-inheritance]
6+
ERROR directives_disjoint_base.py:73:7-24: Class `LeftChildAndRight` inherits from incompatible disjoint bases `LeftChild`, `Right` [invalid-inheritance]
7+
ERROR directives_disjoint_base.py:77:7-27: Class `LeftAndRightViaChild` inherits from incompatible disjoint bases `Left`, `Right` [invalid-inheritance]
8+
ERROR directives_disjoint_base.py:81:7-17: Class `LeftRecord` inherits from incompatible disjoint bases `Left`, `Record` [invalid-inheritance]
9+
ERROR directives_disjoint_base.py:105:7-24: Class `IncompatibleSlots` inherits from incompatible disjoint bases `SlotBase1`, `SlotBase2` [invalid-inheritance]
10+
ERROR directives_disjoint_base.py:113:1-15: `@disjoint_base` cannot be applied to a function [bad-function-definition]
11+
ERROR directives_disjoint_base.py:118:1-15: `@disjoint_base` cannot be applied to a TypedDict [bad-class-definition]
12+
ERROR directives_disjoint_base.py:123:1-15: `@disjoint_base` cannot be applied to a Protocol [bad-class-definition]
1913
"""
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
conformant = "Partial"
2-
notes = """
3-
Return annotation of Self allows returning the concrete instance of the current class.
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 20: Expected 1 errors
8-
Line 33: Expected 1 errors
93
"""
104
output = """
5+
ERROR generics_self_basic.py:20:16-23: Returned type `Shape` is not assignable to declared return type `Self@Shape` [bad-return]
6+
ERROR generics_self_basic.py:33:16-23: Returned type `Shape` is not assignable to declared return type `Self@Shape` [bad-return]
117
ERROR generics_self_basic.py:68:26-35: `Self` may not be subscripted [invalid-annotation]
128
"""

conformance/results/pyrefly/generics_self_usage.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not implement some restrictions on where Self can be used
4-
"""
5-
conformance_automated = "Fail"
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 87: Expected 1 errors
83
"""
94
output = """
105
ERROR generics_self_usage.py:73:14-18: `Self` must appear within a class [invalid-annotation]
116
ERROR generics_self_usage.py:73:23-27: `Self` must appear within a class [invalid-annotation]
127
ERROR generics_self_usage.py:76:6-10: `Self` must appear within a class [invalid-annotation]
138
ERROR generics_self_usage.py:82:9-37: `Self` cannot be used when `self` has an explicit TypeVar annotation [invalid-annotation]
9+
ERROR generics_self_usage.py:87:16-22: Returned type `Foo3` is not assignable to declared return type `Self@Foo3` [bad-return]
1410
ERROR generics_self_usage.py:103:15-19: `Self` must appear within a class [invalid-annotation]
1511
ERROR generics_self_usage.py:105:12-16: `Self` must appear within a class [invalid-annotation]
1612
ERROR generics_self_usage.py:105:12-16: Invalid base class: `Self` [invalid-inheritance]

conformance/results/pyrefly/typeddicts_extra_items.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 typeddicts_extra_items.py:15:45-49: `Literal[1982]` is not assignable to TypedDict key with type `bool` [bad-typed-dict-key]
7-
ERROR typeddicts_extra_items.py:22:55-59: `Literal[1982]` is not assignable to TypedDict key with type `bool` [bad-typed-dict-key]
8-
ERROR typeddicts_extra_items.py:39:54-58: `None` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key]
6+
ERROR typeddicts_extra_items.py:15:45-49: `Literal[1982]` is not assignable to TypedDict key with type `bool` [bad-assignment]
7+
ERROR typeddicts_extra_items.py:22:55-59: `Literal[1982]` is not assignable to TypedDict key with type `bool` [bad-assignment]
8+
ERROR typeddicts_extra_items.py:39:54-58: `None` is not assignable to TypedDict key `year` with type `int` [bad-assignment]
99
ERROR typeddicts_extra_items.py:49:7-16: Expected literal True or False for keyword `closed`, got instance of `bool` [bad-typed-dict]
1010
ERROR typeddicts_extra_items.py:67:7-20: Non-closed TypedDict cannot inherit from closed TypedDict `ClosedBase` [bad-typed-dict]
1111
ERROR typeddicts_extra_items.py:73:7-20: Non-closed TypedDict cannot inherit from TypedDict `ExtraItemsBase` with extra items [bad-typed-dict]

conformance/results/pyrefly/typeddicts_operations.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ conformance_automated = "Pass"
33
errors_diff = """
44
"""
55
output = """
6-
ERROR typeddicts_operations.py:22:17-21: `Literal[1982]` is not assignable to TypedDict key `name` with type `str` [bad-typed-dict-key]
7-
ERROR typeddicts_operations.py:23:17-19: `Literal['']` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key]
6+
ERROR typeddicts_operations.py:22:17-21: `Literal[1982]` is not assignable to TypedDict key `name` with type `str` [bad-assignment]
7+
ERROR typeddicts_operations.py:23:17-19: `Literal['']` is not assignable to TypedDict key `year` with type `int` [bad-assignment]
88
ERROR typeddicts_operations.py:24:7-14: TypedDict `Movie` does not have key `other` [bad-typed-dict-key]
99
ERROR typeddicts_operations.py:26:13-20: TypedDict `Movie` does not have key `other` [bad-typed-dict-key]
1010
ERROR typeddicts_operations.py:28:9-33: Missing required key `year` for TypedDict `Movie` [bad-typed-dict-key]
11-
ERROR typeddicts_operations.py:29:42-48: `float` is not assignable to TypedDict key `year` with type `int` [bad-typed-dict-key]
11+
ERROR typeddicts_operations.py:29:42-48: `float` is not assignable to TypedDict key `year` with type `int` [bad-assignment]
1212
ERROR typeddicts_operations.py:32:36-43: Key `other` is not defined in TypedDict `Movie` [bad-typed-dict-key]
1313
ERROR typeddicts_operations.py:37:20-52: Missing required key `name` for TypedDict `Movie` [bad-typed-dict-key]
1414
ERROR typeddicts_operations.py:37:21-33: Expected string literal key, got `str` [bad-typed-dict-key]

0 commit comments

Comments
 (0)