Skip to content

Commit d8b0825

Browse files
authored
Merge branch 'python:main' into delete_typeddict_kwargs_passing
2 parents c341ec3 + fa0a78a commit d8b0825

29 files changed

Lines changed: 503 additions & 37 deletions
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Does not honor `@override` compatibility checks for `__init__` and `__new__`:
4+
the incompatible constructor overrides in `ChildC2` are not flagged.
5+
"""
26
output = """
37
classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name [misc]
48
classes_override.py:56: error: Method "method4" is marked as an override, but no base method was found with this name [misc]
59
classes_override.py:79: error: Method "static_method1" is marked as an override, but no base method was found with this name [misc]
610
classes_override.py:84: error: Method "class_method1" is marked as an override, but no base method was found with this name [misc]
711
classes_override.py:89: error: Method "property1" is marked as an override, but no base method was found with this name [misc]
812
"""
9-
conformance_automated = "Pass"
13+
conformance_automated = "Fail"
1014
errors_diff = """
15+
Lines 134, 135: Expected error (tag 'init')
16+
Lines 137, 138: Expected error (tag 'new')
1117
"""

‎conformance/results/mypy/generics_variance_inference.toml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
polymorphic functions with bound self type influence variance inference,
4+
which is not part of the variance inference algorithm as described in the spec.
5+
See gh-2281 for details.
6+
"""
27
output = """
38
generics_variance_inference.py:24: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[int, int, int]") [assignment]
49
generics_variance_inference.py:25: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[float, float, int]") [assignment]
@@ -23,7 +28,10 @@ generics_variance_inference.py:169: error: Incompatible types in assignment (exp
2328
generics_variance_inference.py:170: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[int]", variable has type "ShouldBeInvariant6[float]") [assignment]
2429
generics_variance_inference.py:181: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") [assignment]
2530
generics_variance_inference.py:194: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[int]", variable has type "ShouldBeContravariant2[float]") [assignment]
31+
generics_variance_inference.py:204: error: Incompatible types in assignment (expression has type "ShouldBeCovariant7[int]", variable has type "ShouldBeCovariant7[object]") [assignment]
32+
generics_variance_inference.py:205: error: Incompatible types in assignment (expression has type "ShouldBeCovariant7[object]", variable has type "ShouldBeCovariant7[int]") [assignment]
2633
"""
27-
conformance_automated = "Pass"
34+
conformance_automated = "Fail"
2835
errors_diff = """
36+
Line 204: Unexpected errors ['generics_variance_inference.py:204: error: Incompatible types in assignment (expression has type "ShouldBeCovariant7[int]", variable has type "ShouldBeCovariant7[object]") [assignment]']
2937
"""
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
conformant = "Unsupported"
2+
conformance_automated = "Fail"
3+
errors_diff = """
4+
Line 36: Expected 1 errors
5+
Line 39: Expected 1 errors
6+
Line 20: Unexpected errors ['specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]', 'specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]']
7+
Line 22: Unexpected errors ['specialtypes_sentinels.py:22: error: Expression is of type "Any", not MISSING? [assert-type]', 'specialtypes_sentinels.py:22: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]']
8+
Line 24: Unexpected errors ['specialtypes_sentinels.py:24: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]']
9+
Line 26: Unexpected errors ['specialtypes_sentinels.py:26: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]']
10+
Line 28: Unexpected errors ['specialtypes_sentinels.py:28: error: Expression is of type "Any", not Cls.IN_CLASS? [assert-type]', 'specialtypes_sentinels.py:28: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]']
11+
"""
12+
output = """
13+
specialtypes_sentinels.py:14: error: Incompatible default for parameter "x" (default has type "Sentinel", parameter has type "int") [assignment]
14+
specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]
15+
specialtypes_sentinels.py:20: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
16+
specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]
17+
specialtypes_sentinels.py:22: error: Expression is of type "Any", not MISSING? [assert-type]
18+
specialtypes_sentinels.py:22: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]
19+
specialtypes_sentinels.py:22: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
20+
specialtypes_sentinels.py:24: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]
21+
specialtypes_sentinels.py:24: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
22+
specialtypes_sentinels.py:26: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]
23+
specialtypes_sentinels.py:26: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
24+
specialtypes_sentinels.py:28: error: Expression is of type "Any", not Cls.IN_CLASS? [assert-type]
25+
specialtypes_sentinels.py:28: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]
26+
specialtypes_sentinels.py:28: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
27+
"""

‎conformance/results/pycroscope/classes_override.toml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
conformance_automated = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Does not honor `@override` compatibility checks for `__init__` and `__new__`:
4+
the incompatible constructor overrides in `ChildC2` are not flagged.
5+
"""
6+
conformance_automated = "Fail"
27
errors_diff = """
8+
Lines 134, 135: Expected error (tag 'init')
9+
Lines 137, 138: Expected error (tag 'new')
310
"""
411
output = """
512
./classes_override.py:53:4: Method does not override any base method [override_does_not_override]

‎conformance/results/pycroscope/generics_variance_inference.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ output = """
2525
./generics_variance_inference.py:170:0: Incompatible assignment: expected generics_variance_inference.ShouldBeInvariant6[float | int], got generics_variance_inference.ShouldBeInvariant6[int] [incompatible_assignment]
2626
./generics_variance_inference.py:181:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant6[int], got generics_variance_inference.ShouldBeCovariant6[float | int] [incompatible_assignment]
2727
./generics_variance_inference.py:194:0: Incompatible assignment: expected generics_variance_inference.ShouldBeContravariant2[float | int], got generics_variance_inference.ShouldBeContravariant2[int] [incompatible_assignment]
28+
./generics_variance_inference.py:205:0: Incompatible assignment: expected generics_variance_inference.ShouldBeCovariant7[int], got generics_variance_inference.ShouldBeCovariant7[object] [incompatible_assignment]
2829
"""
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
conformance_automated = "Pass"
2+
errors_diff = """
3+
"""
4+
output = """
5+
./specialtypes_sentinels.py:14:10: Default value for argument x incompatible with declared type int [incompatible_default]
6+
./specialtypes_sentinels.py:36:6: Incompatible argument type for x: expected int | Literal[<<MISSING>>, <SPECIAL>] but got <Cls.IN_CLASS> [incompatible_argument]
7+
./specialtypes_sentinels.py:39:6: Incompatible argument type for x: expected int | Literal[<Cls.IN_CLASS>] but got <<MISSING>> [incompatible_argument]
8+
"""

‎conformance/results/pyrefly/classes_override.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ ERROR classes_override.py:57:9-16: Class member `ChildA.method4` is marked as an
88
ERROR classes_override.py:79:9-23: Class member `ChildA.static_method1` is marked as an override, but no parent class has a matching attribute [bad-override]
99
ERROR classes_override.py:84:9-22: Class member `ChildA.class_method1` is marked as an override, but no parent class has a matching attribute [bad-override]
1010
ERROR classes_override.py:89:9-18: Class member `ChildA.property1` is marked as an override, but no parent class has a matching attribute [bad-override]
11+
ERROR classes_override.py:135:9-17: Class member `ChildC2.__init__` overrides parent class `ParentC` in an inconsistent manner [bad-override]
12+
ERROR classes_override.py:138:9-16: Class member `ChildC2.__new__` overrides parent class `ParentC` in an inconsistent manner [bad-override]
1113
"""

‎conformance/results/pyrefly/generics_variance_inference.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ ERROR generics_variance_inference.py:169:31-58: `ShouldBeInvariant6[float]` is n
2626
ERROR generics_variance_inference.py:170:33-58: `ShouldBeInvariant6[int]` is not assignable to `ShouldBeInvariant6[float]` [bad-assignment]
2727
ERROR generics_variance_inference.py:181:31-58: `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]` [bad-assignment]
2828
ERROR generics_variance_inference.py:194:37-66: `ShouldBeContravariant2[int]` is not assignable to `ShouldBeContravariant2[float]` [bad-assignment]
29+
ERROR generics_variance_inference.py:205:31-59: `ShouldBeCovariant7[object]` is not assignable to `ShouldBeCovariant7[int]` [bad-assignment]
2930
"""
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
3+
errors_diff = """
4+
"""
5+
output = """
6+
ERROR specialtypes_sentinels.py:14:20-27: Default `<MISSING>` is not assignable to parameter `x` with type `int` [bad-function-definition]
7+
ERROR specialtypes_sentinels.py:36:7-19: Argument `Cls.Cls.IN_CLASS` is not assignable to parameter `x` with type `int | <MISSING> | SPECIAL` in function `func2` [bad-argument-type]
8+
ERROR specialtypes_sentinels.py:39:7-14: Argument `<MISSING>` is not assignable to parameter `x` with type `int | Cls.Cls.IN_CLASS` in function `func3` [bad-argument-type]
9+
"""
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Does not honor `@override` compatibility checks for `__init__` and `__new__`:
4+
the incompatible constructor overrides in `ChildC2` are not flagged.
5+
"""
26
output = """
37
classes_override.py:53:9 - error: Method "method3" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
48
classes_override.py:65:9 - error: Method "method4" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
59
classes_override.py:79:9 - error: Method "static_method1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
610
classes_override.py:84:9 - error: Method "class_method1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
711
classes_override.py:89:9 - error: Method "property1" is marked as override, but no base method of same name is present (reportGeneralTypeIssues)
812
"""
9-
conformance_automated = "Pass"
13+
conformance_automated = "Fail"
1014
errors_diff = """
15+
Lines 134, 135: Expected error (tag 'init')
16+
Lines 137, 138: Expected error (tag 'new')
1117
"""

0 commit comments

Comments
 (0)