Skip to content

Commit 2ed4369

Browse files
authored
Updated conformance results for mypy 1.16. (#2019)
It addresses a bugs detected by tuples_unpacked, overload_definitions, generics_typevartuple_specialization, and classes_override conformance tests.
1 parent 6c964dd commit 2ed4369

14 files changed

+32
-42
lines changed
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not handle case where parent class derives from Any.
4-
"""
1+
conformant = "Pass"
52
output = """
63
classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name [misc]
74
classes_override.py:56: error: Method "method4" is marked as an override, but no base method was found with this name [misc]
85
classes_override.py:79: error: Method "static_method1" is marked as an override, but no base method was found with this name [misc]
96
classes_override.py:84: error: Method "class_method1" is marked as an override, but no base method was found with this name [misc]
107
classes_override.py:89: error: Method "property1" is marked as an override, but no base method was found with this name [misc]
11-
classes_override.py:101: error: Method "method1" is marked as an override, but no base method was found with this name [misc]
128
"""
13-
conformance_automated = "Fail"
9+
conformance_automated = "Pass"
1410
errors_diff = """
15-
Line 101: Unexpected errors ['classes_override.py:101: error: Method "method1" is marked as an override, but no base method was found with this name [misc]']
1611
"""

conformance/results/mypy/dataclasses_frozen.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ conformant = "Pass"
22
output = """
33
dataclasses_frozen.py:16: error: Property "a" defined in "DC1" is read-only [misc]
44
dataclasses_frozen.py:17: error: Property "b" defined in "DC1" is read-only [misc]
5-
dataclasses_frozen.py:23: error: Cannot inherit non-frozen dataclass from a frozen one [misc]
6-
dataclasses_frozen.py:33: error: Cannot inherit frozen dataclass from a non-frozen one [misc]
5+
dataclasses_frozen.py:23: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc]
6+
dataclasses_frozen.py:33: error: Frozen dataclass cannot inherit from a non-frozen dataclass [misc]
77
"""
88
conformance_automated = "Pass"
99
errors_diff = """

conformance/results/mypy/dataclasses_transform_class.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-
dataclasses_transform_class.py:51: error: Cannot inherit non-frozen dataclass from a frozen one [misc]
3+
dataclasses_transform_class.py:51: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc]
44
dataclasses_transform_class.py:63: error: Property "id" defined in "Customer1" is read-only [misc]
55
dataclasses_transform_class.py:66: error: Too many positional arguments for "Customer1" [misc]
66
dataclasses_transform_class.py:72: error: Unsupported left operand type for < ("Customer1") [operator]

conformance/results/mypy/dataclasses_transform_func.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dataclasses_transform_func.py:53: error: Too many positional arguments for "Cust
88
dataclasses_transform_func.py:57: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
99
dataclasses_transform_func.py:65: error: Unexpected keyword argument "salary" for "Customer1" [call-arg]
1010
dataclasses_transform_func.py:71: error: Too many positional arguments for "Customer2" [misc]
11-
dataclasses_transform_func.py:90: error: Cannot inherit non-frozen dataclass from a frozen one [misc]
11+
dataclasses_transform_func.py:90: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc]
1212
dataclasses_transform_func.py:97: error: Property "id" defined in "Customer3" is read-only [misc]
1313
"""
1414
conformance_automated = "Fail"

conformance/results/mypy/dataclasses_transform_meta.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-
dataclasses_transform_meta.py:51: error: Cannot inherit non-frozen dataclass from a frozen one [misc]
3+
dataclasses_transform_meta.py:51: error: Non-frozen dataclass cannot inherit from a frozen dataclass [misc]
44
dataclasses_transform_meta.py:63: error: Property "id" defined in "Customer1" is read-only [misc]
55
dataclasses_transform_meta.py:66: error: Too many positional arguments for "Customer1" [misc]
66
dataclasses_transform_meta.py:73: error: Unsupported left operand type for < ("Customer1") [operator]

conformance/results/mypy/generics_typevartuple_specialization.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,21 @@ conformant = "Partial"
22
notes = """
33
Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided.
44
Rejects specialization of generic type alias defined as a tuple containing a TypeVar.
5-
"More than one Unpack" error message has no line number.
65
"""
76
output = """
8-
generics_typevartuple_specialization.py: error: More than one Unpack in a type is not allowed [misc]
97
generics_typevartuple_specialization.py:85: error: Argument 1 to "takes_float_array_with_specific_shape" has incompatible type "Array2[float, *tuple[Any, ...]]"; expected "Array2[float, Height, Width]" [arg-type]
108
generics_typevartuple_specialization.py:108: error: Type application is only supported for generic classes [misc]
119
generics_typevartuple_specialization.py:109: error: Type application is only supported for generic classes [misc]
1210
generics_typevartuple_specialization.py:109: error: Unpack is only valid in a variadic position [valid-type]
1311
generics_typevartuple_specialization.py:110: error: Type application is only supported for generic classes [misc]
1412
generics_typevartuple_specialization.py:110: error: Unpack is only valid in a variadic position [valid-type]
13+
generics_typevartuple_specialization.py:121: error: More than one Unpack in a type is not allowed [misc]
14+
generics_typevartuple_specialization.py:122: error: More than one Unpack in a type is not allowed [misc]
1515
generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected at least 2, given 1 [type-arg]
1616
generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split [type-arg]
1717
"""
1818
conformance_automated = "Fail"
1919
errors_diff = """
20-
Line 121: Expected 1 errors
21-
Line 122: Expected 1 errors
2220
Line 85: Unexpected errors ['generics_typevartuple_specialization.py:85: error: Argument 1 to "takes_float_array_with_specific_shape" has incompatible type "Array2[float, *tuple[Any, ...]]"; expected "Array2[float, Height, Width]" [arg-type]']
2321
Line 108: Unexpected errors ['generics_typevartuple_specialization.py:108: error: Type application is only supported for generic classes [misc]']
2422
"""

conformance/results/mypy/overloads_definitions.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
conformant = "Partial"
22
conformance_automated = "Fail"
33
notes = """
4-
Does not allow an overload with no implementation in an abstract base class.
54
Allows @override to be on all overloads and implementation, instead of just implementation.
65
"""
76
errors_diff = """
87
Lines 220, 221, 222, 225, 226: Expected error (tag 'override_impl')
9-
Line 47: Unexpected errors ['overloads_definitions.py:47: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]']
108
"""
119
output = """
1210
overloads_definitions.py:15: error: Single overload definition, multiple required [misc]
1311
overloads_definitions.py:27: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
14-
overloads_definitions.py:47: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
1512
overloads_definitions.py:58: error: An overloaded function outside a stub file must have an implementation [no-overload-impl]
1613
overloads_definitions.py:71: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc]
1714
overloads_definitions.py:84: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc]

conformance/results/mypy/specialtypes_never.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ conformant = "Pass"
22
output = """
33
specialtypes_never.py:19: error: Implicit return in function which does not return [misc]
44
specialtypes_never.py:86: error: Incompatible types in assignment (expression has type "list[Never]", variable has type "list[int]") [assignment]
5-
specialtypes_never.py:86: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
5+
specialtypes_never.py:86: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
66
specialtypes_never.py:86: note: Consider using "Sequence" instead, which is covariant
77
specialtypes_never.py:105: error: Incompatible return value type (got "ClassC[Never]", expected "ClassC[U]") [return-value]
88
"""
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
conformant = "Partial"
22
notes = """
3-
"More than one unpack" error is missing a line number.
3+
"More than one unpack" error is missing in some cases.
44
"""
55
output = """
6-
tuples_unpacked.py: error: More than one Unpack in a type is not allowed [misc]
6+
tuples_unpacked.py:40: error: More than one Unpack in a type is not allowed [misc]
7+
tuples_unpacked.py:51: error: More than one Unpack in a type is not allowed [misc]
78
tuples_unpacked.py:59: error: More than one Unpack in a type is not allowed [misc]
89
"""
910
conformance_automated = "Fail"
1011
errors_diff = """
11-
Line 40: Expected 1 errors
1212
Line 41: Expected 1 errors
13-
Line 51: Expected 1 errors
1413
Lines 60, 61: Expected error (tag 't14')
1514
"""

conformance/results/mypy/version.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "mypy 1.15.0"
2-
test_duration = 1.4
1+
version = "mypy 1.16.0"
2+
test_duration = 1.7

0 commit comments

Comments
 (0)