Skip to content

Commit 173483b

Browse files
Bump pyrefly and zuban (#2229)
1 parent 5330f2c commit 173483b

15 files changed

+79
-100
lines changed
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
conformant = "Partial"
2-
notes = """
3-
__slots__ is generated but not checked during attribute assignment
4-
"""
5-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
63
errors_diff = """
7-
Line 25: Expected 1 errors
8-
Line 38: Expected 1 errors
94
"""
105
output = """
116
ERROR dataclasses_slots.py:11:7-10: Cannot specify both `slots=True` and `__slots__` [bad-class-definition]
7+
ERROR dataclasses_slots.py:25:14-15: Object of class `DC2` has no attribute `y` (not declared in `__slots__`) [missing-attribute]
8+
ERROR dataclasses_slots.py:38:14-15: Object of class `DC3` has no attribute `y` (not declared in `__slots__`) [missing-attribute]
129
ERROR dataclasses_slots.py:66:1-14: Class `DC6` has no class attribute `__slots__` [missing-attribute]
1310
ERROR dataclasses_slots.py:69:1-17: Object of class `DC6` has no attribute `__slots__` [missing-attribute]
1411
"""

conformance/results/pyrefly/dataclasses_transform_converter.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ conformance_automated = "Pass"
33
errors_diff = """
44
"""
55
output = """
6-
ERROR dataclasses_transform_converter.py:48:41-55: Argument `() -> int` is not assignable to parameter `converter` with type `(@_) -> int` in function `model_field` [bad-argument-type]
7-
ERROR dataclasses_transform_converter.py:49:41-55: Argument `(*, x: int) -> int` is not assignable to parameter `converter` with type `(@_) -> int` in function `model_field` [bad-argument-type]
6+
ERROR dataclasses_transform_converter.py:48:41-55: Argument `() -> int` is not assignable to parameter `converter` with type `(@_) -> @_` in function `model_field` [bad-argument-type]
7+
ERROR dataclasses_transform_converter.py:49:41-55: Argument `(*, x: int) -> int` is not assignable to parameter `converter` with type `(@_) -> @_` in function `model_field` [bad-argument-type]
88
ERROR dataclasses_transform_converter.py:107:5-6: Argument `Literal[1]` is not assignable to parameter `field0` with type `str` in function `DC2.__init__` [bad-argument-type]
99
ERROR dataclasses_transform_converter.py:108:23-24: Argument `Literal[1]` is not assignable to parameter `field3` with type `bytes | str` in function `DC2.__init__` [bad-argument-type]
1010
ERROR dataclasses_transform_converter.py:109:29-31: Argument `complex` is not assignable to parameter `field4` with type `list[str] | str` in function `DC2.__init__` [bad-argument-type]
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
conformant = "Pass"
2-
conformance_automated = "Pass"
1+
conformant = "Unsupported"
2+
conformance_automated = "Fail"
33
errors_diff = """
4+
Line 18: Expected 1 errors
5+
Line 24: Expected 1 errors
6+
Line 25: Expected 1 errors
7+
Line 30: Expected 1 errors
8+
Line 41: Expected 1 errors
9+
Line 42: Expected 1 errors
10+
Line 44: Expected 1 errors
11+
Line 47: Expected 1 errors
12+
Line 48: Expected 1 errors
13+
Line 58: Expected 1 errors
14+
Line 69: Expected 1 errors
15+
Line 98: Expected 1 errors
416
"""
517
output = """
6-
WARN directives_deprecated.py:18:44-47: `Ham` is deprecated [deprecated]
7-
WARN directives_deprecated.py:24:1-23: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
8-
WARN directives_deprecated.py:25:5-27: `_directives_deprecated_library.norwegian_blue` is deprecated [deprecated]
9-
WARN directives_deprecated.py:30:12-15: Call to deprecated overload `_directives_deprecated_library.foo` [deprecated]
10-
WARN directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [deprecated]
11-
WARN directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [deprecated]
12-
WARN directives_deprecated.py:44:1-12: `_directives_deprecated_library.Spam.greasy` is deprecated [deprecated]
13-
WARN directives_deprecated.py:47:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
14-
WARN directives_deprecated.py:48:1-11: `_directives_deprecated_library.Spam.shape` is deprecated [deprecated]
15-
WARN directives_deprecated.py:58:1-10: `Invocable.__call__` is deprecated [deprecated]
16-
WARN directives_deprecated.py:69:1-6: `lorem` is deprecated [deprecated]
17-
WARN directives_deprecated.py:98:5-10: `SupportsFoo1.foo` is deprecated [deprecated]
1818
"""

conformance/results/pyrefly/generics_basic.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ Spurious error for constrained type var call.
55
"""
66
conformance_automated = "Fail"
77
errors_diff = """
8-
Line 34: Unexpected errors ['`+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]', '`+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]']
98
Line 44: Unexpected errors ['Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]']
109
"""
1110
output = """
12-
ERROR generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]
13-
ERROR generics_basic.py:34:12-17: `+` is not supported between `AnyStr` and `AnyStr` [unsupported-operation]
1411
ERROR generics_basic.py:40:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]
1512
ERROR generics_basic.py:41:15-16: Argument `str` is not assignable to parameter `y` with type `bytes` in function `concat` [bad-argument-type]
1613
ERROR generics_basic.py:44:15-16: Argument `bytes` is not assignable to parameter `y` with type `str` in function `concat` [bad-argument-type]

conformance/results/pyrefly/generics_syntax_scoping.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ output = """
66
ERROR generics_syntax_scoping.py:14:20-31: Type variable bounds and constraints must be concrete [invalid-annotation]
77
ERROR generics_syntax_scoping.py:18:26-27: Expected a type form, got instance of `int` [not-a-type]
88
ERROR generics_syntax_scoping.py:35:7-8: `T` is uninitialized [unbound-name]
9-
ERROR generics_syntax_scoping.py:44:17-18: `T` is uninitialized [unbound-name]
109
ERROR generics_syntax_scoping.py:44:17-18: Expected a type form, got instance of `int` [not-a-type]
1110
ERROR generics_syntax_scoping.py:92:17-18: Type parameter `T` shadows a type parameter of the same name from an enclosing scope [invalid-type-var]
1211
ERROR generics_syntax_scoping.py:95:17-18: Type parameter `T` shadows a type parameter of the same name from an enclosing scope [invalid-type-var]
Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
conformance_automated = "Fail"
2-
conformant = "Partial"
3-
notes = """
4-
Cannot find a common supertype of `list[int]` and `set[int]` in order to solve a type variable bound to `Sized`.
5-
"""
1+
conformance_automated = "Pass"
2+
conformant = "Pass"
63
errors_diff = """
7-
Lines 43, 44: Expected exactly one error (tag 'mixed-collections')
8-
Line 43: Unexpected errors ['assert_type(list[int], list[int] | set[int]) failed [assert-type]', 'Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]']
9-
Line 44: Unexpected errors ['assert_type(list[int], Collection[int]) failed [assert-type]', 'Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]']
104
"""
115
output = """
126
ERROR generics_upper_bound.py:24:38-45: Type variable bounds and constraints must be concrete [invalid-annotation]
13-
ERROR generics_upper_bound.py:43:16-59: assert_type(list[int], list[int] | set[int]) failed [assert-type]
14-
ERROR generics_upper_bound.py:43:31-35: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]
15-
ERROR generics_upper_bound.py:44:16-54: assert_type(list[int], Collection[int]) failed [assert-type]
16-
ERROR generics_upper_bound.py:44:31-35: Argument `set[int]` is not assignable to parameter `y` with type `list[int]` in function `longer` [bad-argument-type]
7+
ERROR generics_upper_bound.py:44:16-54: assert_type(list[int] | set[int], Collection[int]) failed [assert-type]
178
ERROR generics_upper_bound.py:52:7-13: `int` is not assignable to upper bound `Sized` of type variable `ST` [bad-specialization]
189
ERROR generics_upper_bound.py:57:38-49: TypeVar cannot have both constraints and bound [invalid-type-var]
1910
"""

conformance/results/pyrefly/overloads_evaluation.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ errors_diff = """
44
"""
55
output = """
66
ERROR overloads_evaluation.py:38:11-13: No matching overload found for function `example1_1` called with arguments: () [no-matching-overload]
7-
ERROR overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` called with arguments: (Literal[1], Literal[1]) [no-matching-overload]
8-
ERROR overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` called with arguments: (Literal[1]) [no-matching-overload]
7+
ERROR overloads_evaluation.py:46:15-16: Argument `Literal[1]` is not assignable to parameter `y` with type `str` in function `example1_1` [bad-argument-type]
8+
ERROR overloads_evaluation.py:51:12-13: Argument `Literal[1]` is not assignable to parameter `x` with type `str` in function `example1_1` [bad-argument-type]
99
ERROR overloads_evaluation.py:116:13-22: No matching overload found for function `example2` called with arguments: (int | str, int | str, Literal[1]) [no-matching-overload]
1010
"""
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
conformant = "Pass"
2-
conformance_automated = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Does not detect Protocol type parameters with wrong variance.
4+
"""
5+
conformance_automated = "Fail"
36
errors_diff = """
7+
Line 21: Expected 1 errors
8+
Line 40: Expected 1 errors
9+
Line 56: Expected 1 errors
10+
Line 66: Expected 1 errors
11+
Line 104: Expected 1 errors
412
"""
513
output = """
6-
WARN protocols_variance.py:21:7-17: Type variable `T1` in class `AnotherBox` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
7-
WARN protocols_variance.py:40:7-16: Type variable `T3` in class `Protocol2` is declared as invariant, but could be contravariant based on its usage [variance-mismatch]
8-
WARN protocols_variance.py:56:7-16: Type variable `T1` in class `Protocol4` is declared as invariant, but could be contravariant based on its usage [variance-mismatch]
914
ERROR protocols_variance.py:62:9-11: Type variable `T1_co` is Covariant but is used in contravariant position [invalid-variance]
10-
WARN protocols_variance.py:66:7-16: Type variable `T1` in class `Protocol6` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
1115
ERROR protocols_variance.py:72:9-11: Type variable `T1_contra` is Contravariant but is used in covariant position [invalid-variance]
12-
WARN protocols_variance.py:104:7-17: Type variable `T1` in class `Protocol12` is declared as invariant, but could be covariant based on its usage [variance-mismatch]
1316
"""

conformance/results/pyrefly/typeddicts_extra_items.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ERROR typeddicts_extra_items.py:256:13-22: `MovieExtraStr` is not assignable to
2727
ERROR typeddicts_extra_items.py:257:13-22: `MovieExtraInt` is not assignable to variable `extra_str` with type `MovieExtraStr` [bad-assignment]
2828
ERROR typeddicts_extra_items.py:268:14-24: `MovieNotClosed` is not assignable to variable `extra_int2` with type `MovieExtraInt` [bad-assignment]
2929
ERROR typeddicts_extra_items.py:278:15-57: No matching overload found for function `NonClosedMovie.__init__` called with arguments: (name=Literal['No Country for Old Men'], year=Literal[2007]) [no-matching-overload]
30-
ERROR typeddicts_extra_items.py:285:11-62: No matching overload found for function `ExtraMovie.__init__` called with arguments: (name=Literal['No Country for Old Men'], language=Literal['English']) [no-matching-overload]
30+
ERROR typeddicts_extra_items.py:285:52-61: Keyword argument `language` with type `Literal['English']` is not assignable to kwargs type `int` in function `ExtraMovie.__init__` [bad-argument-type]
3131
ERROR typeddicts_extra_items.py:293:12-54: No matching overload found for function `ClosedMovie.__init__` called with arguments: (name=Literal['No Country for Old Men'], year=Literal[2007]) [no-matching-overload]
3232
ERROR typeddicts_extra_items.py:303:34-44: `MovieExtraInt` is not assignable to `Mapping[str, int]` [bad-assignment]
3333
ERROR typeddicts_extra_items.py:352:25-52: `dict[str, int]` is not assignable to `IntDict` [bad-assignment]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "pyrefly 0.56.0"
1+
version = "pyrefly 0.58.0"

0 commit comments

Comments
 (0)