Skip to content

Commit f8be15b

Browse files
committed
conformance: bump type checker versions
mypy: 1.19.1 -> 1.20.0 pyrefly: 0.58.0 -> 0.60.0 zuban: 0.6.2 -> 0.7.0
1 parent d08c053 commit f8be15b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+175
-259
lines changed

conformance/results/mypy/callables_kwargs.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ notes = """
33
Allows callable without kwargs to be assigned to callable with unpacked kwargs
44
"""
55
output = """
6-
callables_kwargs.py:22: note: "func1" defined here
76
callables_kwargs.py:46: error: Missing named argument "v1" for "func1" [call-arg]
87
callables_kwargs.py:46: error: Missing named argument "v3" for "func1" [call-arg]
98
callables_kwargs.py:51: error: Unexpected keyword argument "v4" for "func1" [call-arg]
@@ -15,14 +14,14 @@ callables_kwargs.py:63: error: "func1" gets multiple values for keyword argument
1514
callables_kwargs.py:64: error: "func2" gets multiple values for keyword argument "v3" [misc]
1615
callables_kwargs.py:64: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type]
1716
callables_kwargs.py:65: error: "func2" gets multiple values for keyword argument "v1" [misc]
18-
callables_kwargs.py:101: error: Incompatible types in assignment (expression has type "def func1(**kwargs: Unpack[TD2]) -> None", variable has type "TDProtocol3") [assignment]
17+
callables_kwargs.py:101: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol3") [assignment]
1918
callables_kwargs.py:101: note: "TDProtocol3.__call__" has type "def __call__(self, *, v1: int, v2: int, v3: str) -> None"
20-
callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "def func1(**kwargs: Unpack[TD2]) -> None", variable has type "TDProtocol4") [assignment]
19+
callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol4") [assignment]
2120
callables_kwargs.py:102: note: "TDProtocol4.__call__" has type "def __call__(self, *, v1: int) -> None"
22-
callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "def func1(**kwargs: Unpack[TD2]) -> None", variable has type "TDProtocol5") [assignment]
21+
callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol5") [assignment]
2322
callables_kwargs.py:103: note: "TDProtocol5.__call__" has type "def __call__(self, v1: int, v3: str) -> None"
24-
callables_kwargs.py:111: error: Overlap between argument names and ** TypedDict items: "v1" [misc]
25-
callables_kwargs.py:122: error: Unpack item in ** argument must be a TypedDict [misc]
23+
callables_kwargs.py:111: error: Overlap between parameter names and ** TypedDict items: "v1" [misc]
24+
callables_kwargs.py:122: error: Unpack item in ** parameter must be a TypedDict [misc]
2625
"""
2726
conformance_automated = "Fail"
2827
errors_diff = """

conformance/results/mypy/constructors_callable.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,33 @@ Line 128: Unexpected errors ['constructors_callable.py:128: error: Expression is
1717
Line 145: Unexpected errors ['constructors_callable.py:145: error: Expression is of type "Class6Any", not "Any" [assert-type]', 'constructors_callable.py:145: error: Too few arguments [call-arg]']
1818
"""
1919
output = """
20-
constructors_callable.py:36: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class1"
20+
constructors_callable.py:36: note: Revealed type is "def (x: int) -> constructors_callable.Class1"
2121
constructors_callable.py:38: error: Too few arguments [call-arg]
2222
constructors_callable.py:39: error: Unexpected keyword argument "y" [call-arg]
2323
constructors_callable.py:49: note: Revealed type is "def () -> constructors_callable.Class2"
2424
constructors_callable.py:51: error: Too many arguments [call-arg]
25-
constructors_callable.py:64: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class3"
25+
constructors_callable.py:64: note: Revealed type is "def (x: int) -> constructors_callable.Class3"
2626
constructors_callable.py:66: error: Too few arguments [call-arg]
2727
constructors_callable.py:67: error: Unexpected keyword argument "y" [call-arg]
2828
constructors_callable.py:68: error: Too many arguments [call-arg]
2929
constructors_callable.py:74: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc]
30-
constructors_callable.py:79: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class4"
30+
constructors_callable.py:79: note: Revealed type is "def (x: int) -> constructors_callable.Class4"
3131
constructors_callable.py:80: error: Expression is of type "Class4", not "int" [assert-type]
3232
constructors_callable.py:81: error: Too few arguments [call-arg]
3333
constructors_callable.py:82: error: Unexpected keyword argument "y" [call-arg]
3434
constructors_callable.py:99: note: Revealed type is "def (*args: Any, **kwargs: Any) -> constructors_callable.Class5"
3535
constructors_callable.py:102: error: Expression is of type "Class5", not "Never" [assert-type]
3636
constructors_callable.py:107: error: Expression is of type "Class5", not "Never" [assert-type]
3737
constructors_callable.py:118: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]
38-
constructors_callable.py:127: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6"
38+
constructors_callable.py:127: note: Revealed type is "def (x: int) -> constructors_callable.Class6"
3939
constructors_callable.py:128: error: Expression is of type "Class6", not "Class6Proxy" [assert-type]
4040
constructors_callable.py:128: error: Too few arguments [call-arg]
41-
constructors_callable.py:144: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6Any"
41+
constructors_callable.py:144: note: Revealed type is "def (x: int) -> constructors_callable.Class6Any"
4242
constructors_callable.py:145: error: Expression is of type "Class6Any", not "Any" [assert-type]
4343
constructors_callable.py:145: error: Too few arguments [call-arg]
44-
constructors_callable.py:164: note: Revealed type is "Overload(def (x: builtins.int) -> constructors_callable.Class7[builtins.int], def (x: builtins.str) -> constructors_callable.Class7[builtins.str])"
45-
constructors_callable.py:184: note: Revealed type is "def [T] (x: builtins.list[T`1], y: builtins.list[T`1]) -> constructors_callable.Class8[T`1]"
44+
constructors_callable.py:164: note: Revealed type is "Overload(def (x: int) -> constructors_callable.Class7[int], def (x: str) -> constructors_callable.Class7[str])"
45+
constructors_callable.py:184: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class8[T]"
4646
constructors_callable.py:186: error: Cannot infer function type argument [misc]
47-
constructors_callable.py:195: note: Revealed type is "def [T] (x: builtins.list[T`-1], y: builtins.list[T`-1]) -> constructors_callable.Class9"
47+
constructors_callable.py:195: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class9"
4848
constructors_callable.py:197: error: Cannot infer function type argument [misc]
4949
"""

conformance/results/mypy/dataclasses_descriptors.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ notes = """
33
Does not correctly evaluate type of descriptor access.
44
"""
55
output = """
6+
dataclasses_descriptors.py:61: error: Cannot access instance-only attribute "x" on class object [misc]
7+
dataclasses_descriptors.py:62: error: Cannot access instance-only attribute "y" on class object [misc]
68
dataclasses_descriptors.py:66: error: Expression is of type "Desc2[int]", not "int" [assert-type]
79
dataclasses_descriptors.py:67: error: Expression is of type "Desc2[str]", not "str" [assert-type]
810
"""
911
conformance_automated = "Fail"
1012
errors_diff = """
13+
Line 61: Unexpected errors ['dataclasses_descriptors.py:61: error: Cannot access instance-only attribute "x" on class object [misc]']
14+
Line 62: Unexpected errors ['dataclasses_descriptors.py:62: error: Cannot access instance-only attribute "y" on class object [misc]']
1115
Line 66: Unexpected errors ['dataclasses_descriptors.py:66: error: Expression is of type "Desc2[int]", not "int" [assert-type]']
1216
Line 67: Unexpected errors ['dataclasses_descriptors.py:67: error: Expression is of type "Desc2[str]", not "str" [assert-type]']
1317
"""

conformance/results/mypy/directives_deprecated.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ output = """
66
directives_deprecated.py:18: error: class _directives_deprecated_library.Ham is deprecated: Use Spam instead [deprecated]
77
directives_deprecated.py:24: error: function _directives_deprecated_library.norwegian_blue is deprecated: It is pining for the fjords [deprecated]
88
directives_deprecated.py:25: error: function _directives_deprecated_library.norwegian_blue is deprecated: It is pining for the fjords [deprecated]
9-
directives_deprecated.py:30: error: overload def (x: builtins.int) -> builtins.str of function _directives_deprecated_library.foo is deprecated: Only str will be allowed [deprecated]
9+
directives_deprecated.py:30: error: overload def (x: int) -> str of function _directives_deprecated_library.foo is deprecated: Only str will be allowed [deprecated]
1010
directives_deprecated.py:41: error: function _directives_deprecated_library.Spam.__add__ is deprecated: There is enough spam in the world [deprecated]
1111
directives_deprecated.py:42: error: function _directives_deprecated_library.Spam.__add__ is deprecated: There is enough spam in the world [deprecated]
1212
directives_deprecated.py:44: error: function _directives_deprecated_library.Spam.greasy is deprecated: All spam will be equally greasy [deprecated]

conformance/results/mypy/directives_reveal_type.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
conformant = "Pass"
22
output = """
3-
directives_reveal_type.py:14: note: Revealed type is "builtins.int | builtins.str"
4-
directives_reveal_type.py:15: note: Revealed type is "builtins.list[builtins.int]"
3+
directives_reveal_type.py:14: note: Revealed type is "int | str"
4+
directives_reveal_type.py:15: note: Revealed type is "list[int]"
55
directives_reveal_type.py:16: note: Revealed type is "Any"
66
directives_reveal_type.py:17: note: Revealed type is "directives_reveal_type.ForwardReference"
77
directives_reveal_type.py:19: error: "reveal_type" expects 1 argument [misc]

conformance/results/mypy/generics_defaults_referential.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ output = """
66
generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]
77
generics_defaults_referential.py:38: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type]
88
generics_defaults_referential.py:54: error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope [misc]
9+
generics_defaults_referential.py:61: error: Type variable S1 referenced in the default of S2 is unbound [misc]
910
generics_defaults_referential.py:75: error: TypeVar default must be one of the constraint types [misc]
1011
generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc]
1112
generics_defaults_referential.py:79: error: TypeVar default must be one of the constraint types [misc]
@@ -14,7 +15,6 @@ generics_defaults_referential.py:104: error: Expression is of type "Bar[int, lis
1415
conformance_automated = "Fail"
1516
errors_diff = """
1617
Line 37: Expected 1 errors
17-
Line 61: Expected 1 errors
1818
Line 69: Expected 1 errors
1919
Line 23: Unexpected errors ['generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]']
2020
Line 78: Unexpected errors ['generics_defaults_referential.py:78: error: TypeVar default must be one of the constraint types [misc]']

conformance/results/mypy/historical_positional.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@ Treats keyword-only parameter as positional-only.
55
Applies legacy positional-only rules when PEP 570 syntax is used.
66
"""
77
output = """
8-
historical_positional.py:13: note: "f1" defined here
98
historical_positional.py:18: error: Unexpected keyword argument "__x" for "f1" [call-arg]
10-
historical_positional.py:45: note: "f3" defined here
119
historical_positional.py:48: error: Unexpected keyword argument "__y" for "f3" [call-arg]
12-
historical_positional.py:52: note: "m1" of "A" defined here
1310
historical_positional.py:59: error: Unexpected keyword argument "__x" for "m1" of "A" [call-arg]
14-
historical_positional.py:66: note: "f4" defined here
1511
historical_positional.py:69: error: Unexpected keyword argument "__y" for "f4" [call-arg]
1612
"""
1713
conformance_automated = "Fail"

conformance/results/mypy/overloads_consistency.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ errors_diff = """
44
"""
55
output = """
66
overloads_consistency.py:28: error: Overloaded function implementation cannot produce return type of signature 2 [misc]
7-
overloads_consistency.py:44: error: Overloaded function implementation does not accept all possible arguments of signature 2 [misc]
7+
overloads_consistency.py:44: error: Overloaded function implementation does not accept all possible parameters of signature 2 [misc]
88
"""

conformance/results/mypy/tuples_type_compat.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ tuples_type_compat.py:62: error: Incompatible types in assignment (expression ha
1212
tuples_type_compat.py:76: error: Expression is of type "tuple[int]", not "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]" [assert-type]
1313
tuples_type_compat.py:81: error: Expression is of type "tuple[str, str] | tuple[int, int]", not "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]" [assert-type]
1414
tuples_type_compat.py:86: error: Expression is of type "tuple[int, str, int]", not "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]" [assert-type]
15-
tuples_type_compat.py:101: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int]" [assert-type]
16-
tuples_type_compat.py:106: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[str, str] | tuple[int, int]" [assert-type]
17-
tuples_type_compat.py:111: error: Expression is of type "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]", not "tuple[int, str, int]" [assert-type]
15+
tuples_type_compat.py:102: error: Expression is of type "tuple[int]", not "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]" [assert-type]
16+
tuples_type_compat.py:107: error: Expression is of type "tuple[str, str] | tuple[int, int]", not "tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]" [assert-type]
1817
tuples_type_compat.py:127: error: Expression is of type "tuple[int | str, str]", not "tuple[int | str, int | str]" [assert-type]
1918
tuples_type_compat.py:130: error: Expression is of type "tuple[int | str, int]", not "tuple[int | str, int | str]" [assert-type]
2019
tuples_type_compat.py:149: error: Expression is of type "Sequence[object]", not "Sequence[complex | list[int]]" [assert-type]
@@ -32,6 +31,7 @@ tuples_type_compat.py:188: error: Incompatible types in assignment (expression h
3231
"""
3332
conformance_automated = "Fail"
3433
errors_diff = """
34+
Lines 111, 112: Expected error (tag 'func6_3')
3535
Line 149: Unexpected errors ['tuples_type_compat.py:149: error: Expression is of type "Sequence[object]", not "Sequence[complex | list[int]]" [assert-type]']
3636
Line 152: Unexpected errors ['tuples_type_compat.py:152: error: Expression is of type "Sequence[object]", not "Sequence[int | str]" [assert-type]']
3737
"""

conformance/results/mypy/typeddicts_extra_items.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ typeddicts_extra_items.py:124: error: Unexpected keyword argument "extra_items"
9999
typeddicts_extra_items.py:128: error: Key "name" of TypedDict "MovieEI" cannot be deleted [misc]
100100
typeddicts_extra_items.py:129: error: TypedDict "MovieEI" has no key "year" [typeddict-item]
101101
typeddicts_extra_items.py:137: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]
102-
typeddicts_extra_items.py:140: note: "unpack_no_extra" defined here
103-
typeddicts_extra_items.py:141: note: "unpack_extra" defined here
104102
typeddicts_extra_items.py:143: error: Unexpected keyword argument "year" for "unpack_no_extra" [call-arg]
105103
typeddicts_extra_items.py:144: error: Unexpected keyword argument "year" for "unpack_extra" [call-arg]
106104
typeddicts_extra_items.py:149: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]

0 commit comments

Comments
 (0)