Skip to content

Commit 262fe31

Browse files
authored
Merge branch 'main' into tut-ext-libs
2 parents 90b3910 + 2f043ef commit 262fe31

25 files changed

+126
-104
lines changed

conformance/results/mypy/annotations_generators.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ annotations_generators.py:119: error: Incompatible types in "yield from" (actual
1616
"""
1717
conformance_automated = "Fail"
1818
errors_diff = """
19-
Line 87: Expected 1 errors
20-
Line 92: Expected 1 errors
2119
Line 135: Expected 1 errors
2220
"""

conformance/results/mypy/classes_classvar.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classes_classvar.py:70: error: ClassVar can only be used for assignments in clas
2020
classes_classvar.py:71: error: ClassVar can only be used for assignments in class body [misc]
2121
classes_classvar.py:73: error: ClassVar can only be used for assignments in class body [misc]
2222
classes_classvar.py:77: error: ClassVar can only be used for assignments in class body [misc]
23+
classes_classvar.py:78: error: ClassVar[...] can't be used inside a type alias [valid-type]
2324
classes_classvar.py:111: error: Cannot assign to class variable "stats" via instance [misc]
2425
classes_classvar.py:140: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") [assignment]
2526
classes_classvar.py:140: note: "ProtoAImpl" is missing following "ProtoA" protocol member:
@@ -30,6 +31,5 @@ classes_classvar.py:140: note: Protocol member ProtoA.y expected class variable,
3031
conformance_automated = "Fail"
3132
errors_diff = """
3233
Line 47: Expected 1 errors
33-
Line 78: Expected 1 errors
3434
Line 67: Unexpected errors ['classes_classvar.py:67: error: Invalid type: ClassVar nested inside other type [valid-type]']
3535
"""
Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
1-
conformant = "Partial"
2-
notes = """
3-
Incorrectly rejects kw_only field with default before positional field.
4-
"""
1+
conformant = "Pass"
52
output = """
63
dataclasses_kwonly.py:23: error: Too many positional arguments for "DC1" [misc]
7-
dataclasses_kwonly.py:29: error: Attributes without a default cannot follow attributes with one [misc]
8-
dataclasses_kwonly.py:32: error: Too many positional arguments for "DC2" [misc]
9-
dataclasses_kwonly.py:32: error: Too few arguments for "DC2" [call-arg]
10-
dataclasses_kwonly.py:32: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
11-
dataclasses_kwonly.py:35: error: "DC2" gets multiple values for keyword argument "b" [misc]
12-
dataclasses_kwonly.py:35: error: Too few arguments for "DC2" [call-arg]
13-
dataclasses_kwonly.py:35: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
144
dataclasses_kwonly.py:38: error: Too many positional arguments for "DC2" [misc]
15-
dataclasses_kwonly.py:38: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
16-
dataclasses_kwonly.py:38: error: Argument 2 to "DC2" has incompatible type "int"; expected "str" [arg-type]
175
dataclasses_kwonly.py:53: error: Too many positional arguments for "DC3" [misc]
186
"""
19-
conformance_automated = "Fail"
7+
conformance_automated = "Pass"
208
errors_diff = """
21-
Line 29: Unexpected errors ['dataclasses_kwonly.py:29: error: Attributes without a default cannot follow attributes with one [misc]']
22-
Line 32: Unexpected errors ['dataclasses_kwonly.py:32: error: Too many positional arguments for "DC2" [misc]', 'dataclasses_kwonly.py:32: error: Too few arguments for "DC2" [call-arg]', 'dataclasses_kwonly.py:32: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]']
23-
Line 35: Unexpected errors ['dataclasses_kwonly.py:35: error: "DC2" gets multiple values for keyword argument "b" [misc]', 'dataclasses_kwonly.py:35: error: Too few arguments for "DC2" [call-arg]', 'dataclasses_kwonly.py:35: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]']
249
"""

conformance/results/mypy/dataclasses_transform_func.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Does not handle `kw_only=False` override when `kw_only_default=True`.
44
Does not report error when `order=False` and comparison operators are used.
55
"""
66
output = """
7-
dataclasses_transform_func.py:53: error: Too many positional arguments for "Customer1" [misc]
8-
dataclasses_transform_func.py:57: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
9-
dataclasses_transform_func.py:65: error: Unexpected keyword argument "salary" for "Customer1" [call-arg]
10-
dataclasses_transform_func.py:71: error: Too many positional arguments for "Customer2" [misc]
11-
dataclasses_transform_func.py:90: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc]
12-
dataclasses_transform_func.py:97: error: Property "id" defined in "Customer3" is read-only [misc]
7+
dataclasses_transform_func.py:52: error: Too many positional arguments for "Customer1" [misc]
8+
dataclasses_transform_func.py:56: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
9+
dataclasses_transform_func.py:64: error: Unexpected keyword argument "salary" for "Customer1" [call-arg]
10+
dataclasses_transform_func.py:70: error: Too many positional arguments for "Customer2" [misc]
11+
dataclasses_transform_func.py:89: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc]
12+
dataclasses_transform_func.py:96: error: Property "id" defined in "Customer3" is read-only [misc]
1313
"""
1414
conformance_automated = "Fail"
1515
errors_diff = """
16-
Line 61: Expected 1 errors
17-
Line 53: Unexpected errors ['dataclasses_transform_func.py:53: error: Too many positional arguments for "Customer1" [misc]']
16+
Line 60: Expected 1 errors
17+
Line 52: Unexpected errors ['dataclasses_transform_func.py:52: error: Too many positional arguments for "Customer1" [misc]']
1818
"""

conformance/results/mypy/directives_reveal_type.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
conformant = "Pass"
22
output = """
3-
directives_reveal_type.py:14: note: Revealed type is "Union[builtins.int, builtins.str]"
3+
directives_reveal_type.py:14: note: Revealed type is "builtins.int | builtins.str"
44
directives_reveal_type.py:15: note: Revealed type is "builtins.list[builtins.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"

conformance/results/mypy/enums_behaviors.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ conformant = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
enums_behaviors.py:39: error: Cannot extend enum with existing members: "Shape" [misc]
5+
enums_behaviors.py:28: error: Expression is of type "Color", not "Literal[Color.RED]" [assert-type]
6+
enums_behaviors.py:32: error: Expression is of type "Color", not "Literal[Color.BLUE]" [assert-type]
7+
enums_behaviors.py:44: error: Cannot extend enum with existing members: "Shape" [misc]
68
"""
79
conformance_automated = "Pass"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "mypy 1.16.1"
2-
test_duration = 2.2
1+
version = "mypy 1.17.1"
2+
test_duration = 2.8

conformance/results/pyre/dataclasses_transform_func.toml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@ Does not detect non-frozen class inheriting from frozen class.
55
Emits "attribute not initialized" error for dataclass field.
66
"""
77
output = """
8-
dataclasses_transform_func.py:25:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters.
9-
dataclasses_transform_func.py:29:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
10-
dataclasses_transform_func.py:35:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized.
11-
dataclasses_transform_func.py:36:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized.
12-
dataclasses_transform_func.py:41:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.
13-
dataclasses_transform_func.py:42:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized.
14-
dataclasses_transform_func.py:47:4 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized.
15-
dataclasses_transform_func.py:50:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.
16-
dataclasses_transform_func.py:53:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.
17-
dataclasses_transform_func.py:57:0 Incompatible attribute type [8]: Attribute `name` declared in class `Customer1` has type `str` but is used as type `int`.
18-
dataclasses_transform_func.py:61:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`.
19-
dataclasses_transform_func.py:65:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.
20-
dataclasses_transform_func.py:67:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.
21-
dataclasses_transform_func.py:71:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.
22-
dataclasses_transform_func.py:73:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.
23-
dataclasses_transform_func.py:91:4 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized.
24-
dataclasses_transform_func.py:97:0 Invalid assignment [41]: Cannot reassign final attribute `c3_1.id`.
8+
dataclasses_transform_func.py:19:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).
9+
dataclasses_transform_func.py:24:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters.
10+
dataclasses_transform_func.py:34:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized.
11+
dataclasses_transform_func.py:35:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized.
12+
dataclasses_transform_func.py:40:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.
13+
dataclasses_transform_func.py:41:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized.
14+
dataclasses_transform_func.py:46:4 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized.
15+
dataclasses_transform_func.py:49:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.
16+
dataclasses_transform_func.py:52:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.
17+
dataclasses_transform_func.py:56:0 Incompatible attribute type [8]: Attribute `name` declared in class `Customer1` has type `str` but is used as type `int`.
18+
dataclasses_transform_func.py:60:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`.
19+
dataclasses_transform_func.py:64:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.
20+
dataclasses_transform_func.py:66:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.
21+
dataclasses_transform_func.py:70:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.
22+
dataclasses_transform_func.py:72:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.
23+
dataclasses_transform_func.py:90:4 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized.
24+
dataclasses_transform_func.py:96:0 Invalid assignment [41]: Cannot reassign final attribute `c3_1.id`.
2525
"""
2626
conformance_automated = "Fail"
2727
errors_diff = """
28-
Lines 89, 90: Expected error (tag 'Customer3Subclass')
29-
Line 25: Unexpected errors ["dataclasses_transform_func.py:25:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."]
30-
Line 29: Unexpected errors ['dataclasses_transform_func.py:29:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
31-
Line 35: Unexpected errors ['dataclasses_transform_func.py:35:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized.']
32-
Line 36: Unexpected errors ['dataclasses_transform_func.py:36:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized.']
33-
Line 41: Unexpected errors ['dataclasses_transform_func.py:41:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.']
34-
Line 42: Unexpected errors ['dataclasses_transform_func.py:42:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized.']
35-
Line 47: Unexpected errors ['dataclasses_transform_func.py:47:4 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized.']
36-
Line 50: Unexpected errors ['dataclasses_transform_func.py:50:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.']
37-
Line 53: Unexpected errors ['dataclasses_transform_func.py:53:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.']
38-
Line 67: Unexpected errors ['dataclasses_transform_func.py:67:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.']
39-
Line 73: Unexpected errors ['dataclasses_transform_func.py:73:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.']
40-
Line 91: Unexpected errors ['dataclasses_transform_func.py:91:4 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized.']
28+
Lines 88, 89: Expected error (tag 'Customer3Subclass')
29+
Line 19: Unexpected errors ['dataclasses_transform_func.py:19:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).']
30+
Line 24: Unexpected errors ["dataclasses_transform_func.py:24:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."]
31+
Line 34: Unexpected errors ['dataclasses_transform_func.py:34:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized.']
32+
Line 35: Unexpected errors ['dataclasses_transform_func.py:35:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized.']
33+
Line 40: Unexpected errors ['dataclasses_transform_func.py:40:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.']
34+
Line 41: Unexpected errors ['dataclasses_transform_func.py:41:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized.']
35+
Line 46: Unexpected errors ['dataclasses_transform_func.py:46:4 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized.']
36+
Line 49: Unexpected errors ['dataclasses_transform_func.py:49:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.']
37+
Line 52: Unexpected errors ['dataclasses_transform_func.py:52:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.']
38+
Line 66: Unexpected errors ['dataclasses_transform_func.py:66:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.']
39+
Line 72: Unexpected errors ['dataclasses_transform_func.py:72:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.']
40+
Line 90: Unexpected errors ['dataclasses_transform_func.py:90:4 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized.']
4141
"""

conformance/results/pyre/enums_behaviors.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ conformance_automated = "Pass"
55
errors_diff = """
66
"""
77
output = """
8-
enums_behaviors.py:39:0 Invalid inheritance [39]: Cannot inherit from final enum `Shape`. Enums with defined members cannot be extended.
8+
enums_behaviors.py:28:0 Assert type [70]: Expected `typing_extensions.Literal[Color.RED]` but got `Color`.
9+
enums_behaviors.py:32:0 Assert type [70]: Expected `typing_extensions.Literal[Color.BLUE]` but got `Color`.
10+
enums_behaviors.py:44:0 Invalid inheritance [39]: Cannot inherit from final enum `Shape`. Enums with defined members cannot be extended.
911
"""

conformance/results/pyre/generics_paramspec_specialization.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ notes = """
33
Reports error for legitimate use of `...` to specialize ParamSpec
44
"""
55
output = """
6-
generics_paramspec_specialization.py:32:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P2`, but a single type `...` was given for generic type ClassB.
7-
generics_paramspec_specialization.py:36:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `...` was given for generic type ClassA.
86
generics_paramspec_specialization.py:44:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `int` was given for generic type ClassA.
97
generics_paramspec_specialization.py:53:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.
108
generics_paramspec_specialization.py:54:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.
@@ -15,8 +13,6 @@ generics_paramspec_specialization.py:61:4 Too many arguments [19]: PositionalOnl
1513
"""
1614
conformance_automated = "Fail"
1715
errors_diff = """
18-
Line 32: Unexpected errors ['generics_paramspec_specialization.py:32:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P2`, but a single type `...` was given for generic type ClassB.']
19-
Line 36: Unexpected errors ['generics_paramspec_specialization.py:36:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `...` was given for generic type ClassA.']
2016
Line 53: Unexpected errors ['generics_paramspec_specialization.py:53:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.']
2117
Line 59: Unexpected errors ['generics_paramspec_specialization.py:59:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.']
2218
"""

0 commit comments

Comments
 (0)