Skip to content

Commit b908de0

Browse files
authored
Updated conformance results for pyright 1.1.373. (#1818)
Most of the deltas are due to improvements in error messages. Bugs in two tests were fixed (`constructors_callable` and `dataclasses_transform_converter`). A third test (`generics_typevartuple_basic`) was updated to accommodate small differences in where an error is reported. The only visible change in the conformance report is that pyright now passes the conformance tests for dataclass converters.
1 parent 75caed7 commit b908de0

File tree

56 files changed

+319
-343
lines changed

Some content is hidden

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

56 files changed

+319
-343
lines changed

conformance/results/mypy/constructors_callable.toml

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Line 78: Unexpected errors ['constructors_callable.py:78: error: Expression is o
1313
Line 100: Unexpected errors ['constructors_callable.py:100: error: Expression is of type "Class5", not "Never" [assert-type]']
1414
Line 105: Unexpected errors ['constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [assert-type]']
1515
Line 116: Unexpected errors ['constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]']
16-
Line 117: Unexpected errors ['constructors_callable.py:117: error: Incompatible return value type (got "Class6", expected "Class6Proxy") [return-value]']
1716
Line 126: Unexpected errors ['constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" [assert-type]', 'constructors_callable.py:126: error: Too few arguments [call-arg]']
1817
Line 143: Unexpected errors ['constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any" [assert-type]', 'constructors_callable.py:143: error: Too few arguments [call-arg]']
1918
"""
@@ -36,7 +35,6 @@ constructors_callable.py:97: note: Revealed type is "def (*args: Any, **kwargs:
3635
constructors_callable.py:100: error: Expression is of type "Class5", not "Never" [assert-type]
3736
constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [assert-type]
3837
constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]
39-
constructors_callable.py:117: error: Incompatible return value type (got "Class6", expected "Class6Proxy") [return-value]
4038
constructors_callable.py:125: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6"
4139
constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" [assert-type]
4240
constructors_callable.py:126: error: Too few arguments [call-arg]

conformance/results/mypy/dataclasses_transform_converter.toml

+33-33
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@ Converter parameter not yet supported.
44
"""
55
conformance_automated = "Fail"
66
errors_diff = """
7-
Line 47: Expected 1 errors
8-
Line 48: Expected 1 errors
9-
Line 117: Expected 1 errors
10-
Line 129: Expected 1 errors
11-
Line 132: Expected 1 errors
12-
Line 111: Unexpected errors ['dataclasses_transform_converter.py:111: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:111: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:111: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:111: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]', 'dataclasses_transform_converter.py:111: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]']
13-
Line 113: Unexpected errors ['dataclasses_transform_converter.py:113: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
14-
Line 114: Unexpected errors ['dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") [assignment]']
15-
Line 115: Unexpected errors ['dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") [assignment]']
16-
Line 120: Unexpected errors ['dataclasses_transform_converter.py:120: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:120: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:120: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:120: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]', 'dataclasses_transform_converter.py:120: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:120: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" [arg-type]']
7+
Line 118: Expected 1 errors
8+
Line 112: Unexpected errors ['dataclasses_transform_converter.py:112: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]', 'dataclasses_transform_converter.py:112: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]']
9+
Line 114: Unexpected errors ['dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]']
10+
Line 115: Unexpected errors ['dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") [assignment]']
11+
Line 116: Unexpected errors ['dataclasses_transform_converter.py:116: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") [assignment]']
12+
Line 121: Unexpected errors ['dataclasses_transform_converter.py:121: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" [arg-type]', 'dataclasses_transform_converter.py:121: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" [arg-type]']
1713
"""
1814
output = """
19-
dataclasses_transform_converter.py:106: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
20-
dataclasses_transform_converter.py:106: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
21-
dataclasses_transform_converter.py:106: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]
22-
dataclasses_transform_converter.py:106: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]
23-
dataclasses_transform_converter.py:107: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
15+
dataclasses_transform_converter.py:48: error: Argument "converter" to "model_field" has incompatible type "Callable[[], int]"; expected "Callable[[Never], int]" [arg-type]
16+
dataclasses_transform_converter.py:49: error: Argument "converter" to "model_field" has incompatible type "Callable[[NamedArg(int, 'x')], int]"; expected "Callable[[Never], int]" [arg-type]
2417
dataclasses_transform_converter.py:107: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
2518
dataclasses_transform_converter.py:107: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
26-
dataclasses_transform_converter.py:107: error: Argument 4 to "DC2" has incompatible type "int"; expected "ConverterClass" [arg-type]
19+
dataclasses_transform_converter.py:107: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]
2720
dataclasses_transform_converter.py:107: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]
2821
dataclasses_transform_converter.py:108: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
2922
dataclasses_transform_converter.py:108: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
3023
dataclasses_transform_converter.py:108: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
31-
dataclasses_transform_converter.py:108: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]
32-
dataclasses_transform_converter.py:108: error: Argument 5 to "DC2" has incompatible type "complex"; expected "int" [arg-type]
33-
dataclasses_transform_converter.py:111: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
34-
dataclasses_transform_converter.py:111: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
35-
dataclasses_transform_converter.py:111: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
36-
dataclasses_transform_converter.py:111: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]
37-
dataclasses_transform_converter.py:111: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]
38-
dataclasses_transform_converter.py:113: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
39-
dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") [assignment]
40-
dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") [assignment]
41-
dataclasses_transform_converter.py:118: error: Incompatible types in assignment (expression has type "int", variable has type "ConverterClass") [assignment]
42-
dataclasses_transform_converter.py:120: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
43-
dataclasses_transform_converter.py:120: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
44-
dataclasses_transform_converter.py:120: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
45-
dataclasses_transform_converter.py:120: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]
46-
dataclasses_transform_converter.py:120: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" [arg-type]
47-
dataclasses_transform_converter.py:120: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" [arg-type]
24+
dataclasses_transform_converter.py:108: error: Argument 4 to "DC2" has incompatible type "int"; expected "ConverterClass" [arg-type]
25+
dataclasses_transform_converter.py:108: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]
26+
dataclasses_transform_converter.py:109: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
27+
dataclasses_transform_converter.py:109: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
28+
dataclasses_transform_converter.py:109: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
29+
dataclasses_transform_converter.py:109: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]
30+
dataclasses_transform_converter.py:109: error: Argument 5 to "DC2" has incompatible type "complex"; expected "int" [arg-type]
31+
dataclasses_transform_converter.py:112: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
32+
dataclasses_transform_converter.py:112: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
33+
dataclasses_transform_converter.py:112: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
34+
dataclasses_transform_converter.py:112: error: Argument 4 to "DC2" has incompatible type "bytes"; expected "ConverterClass" [arg-type]
35+
dataclasses_transform_converter.py:112: error: Argument 5 to "DC2" has incompatible type "list[Never]"; expected "int" [arg-type]
36+
dataclasses_transform_converter.py:114: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
37+
dataclasses_transform_converter.py:115: error: Incompatible types in assignment (expression has type "str", variable has type "ConverterClass") [assignment]
38+
dataclasses_transform_converter.py:116: error: Incompatible types in assignment (expression has type "bytes", variable has type "ConverterClass") [assignment]
39+
dataclasses_transform_converter.py:119: error: Incompatible types in assignment (expression has type "int", variable has type "ConverterClass") [assignment]
40+
dataclasses_transform_converter.py:121: error: Argument 1 to "DC2" has incompatible type "str"; expected "int" [arg-type]
41+
dataclasses_transform_converter.py:121: error: Argument 2 to "DC2" has incompatible type "str"; expected "int" [arg-type]
42+
dataclasses_transform_converter.py:121: error: Argument 3 to "DC2" has incompatible type "str"; expected "int" [arg-type]
43+
dataclasses_transform_converter.py:121: error: Argument 4 to "DC2" has incompatible type "str"; expected "ConverterClass" [arg-type]
44+
dataclasses_transform_converter.py:121: error: Argument 5 to "DC2" has incompatible type "str"; expected "int" [arg-type]
45+
dataclasses_transform_converter.py:121: error: Argument 6 to "DC2" has incompatible type "tuple[tuple[str, str], tuple[str, str]]"; expected "dict[str, str]" [arg-type]
46+
dataclasses_transform_converter.py:130: error: Argument "converter" to "model_field" has incompatible type "Callable[[str], int]"; expected "Callable[[int], int]" [arg-type]
47+
dataclasses_transform_converter.py:133: error: Cannot infer type argument 1 of "model_field" [misc]
4848
"""

conformance/results/mypy/generics_typevartuple_basic.toml

-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ generics_typevartuple_basic.py:106: error: Can only use one type var tuple in a
2121
"""
2222
conformance_automated = "Fail"
2323
errors_diff = """
24-
Line 44: Expected 1 errors
2524
Line 89: Expected 1 errors
2625
Line 90: Expected 1 errors
27-
Line 45: Unexpected errors ['generics_typevartuple_basic.py:45: error: Argument 1 to "Array" has incompatible type "tuple[Time, Batch, Width, Height]"; expected "tuple[Time, Batch, Height, Width]" [arg-type]']
2826
Line 57: Unexpected errors ['generics_typevartuple_basic.py:57: error: Incompatible return value type (got "tuple[*Shape]", expected "tuple[Any]") [return-value]']
2927
"""

conformance/results/mypy/version.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.11.0"
2-
test_duration = 1.5
2+
test_duration = 1.0

conformance/results/pyre/constructors_callable.toml

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Line 63: Unexpected errors ['constructors_callable.py:63:0 Revealed type [-1]: R
1717
Line 77: Unexpected errors ['constructors_callable.py:77:0 Revealed type [-1]: Revealed type for `r4` is `typing.Callable[[Named(x, int)], Class4]`.']
1818
Line 78: Unexpected errors ['constructors_callable.py:78:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `int` but got `Class4`.']
1919
Line 97: Unexpected errors ['constructors_callable.py:97:0 Revealed type [-1]: Revealed type for `r5` is `typing.Callable[[Variable(typing.Any), Keywords(typing.Any)], NoReturn]`.']
20-
Line 117: Unexpected errors ['constructors_callable.py:117:8 Incompatible return type [7]: Expected `Class6Proxy` but got `Class6`.']
2120
Line 125: Unexpected errors ['constructors_callable.py:125:0 Revealed type [-1]: Revealed type for `r6` is `typing.Callable[[Named(x, int)], Class6]`.']
2221
Line 126: Unexpected errors ['constructors_callable.py:126:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `Class6Proxy` but got `Class6`.', 'constructors_callable.py:126:12 Missing argument [20]: PositionalOnly call expects argument `x`.']
2322
Line 142: Unexpected errors ['constructors_callable.py:142:0 Revealed type [-1]: Revealed type for `r6_any` is `typing.Callable[[Named(x, int)], Class6Any]`.']
@@ -49,7 +48,6 @@ constructors_callable.py:78:0 Incompatible parameter type [6]: In call `assert_t
4948
constructors_callable.py:79:0 Missing argument [20]: PositionalOnly call expects argument `x`.
5049
constructors_callable.py:80:0 Unexpected keyword [28]: Unexpected keyword argument `y` to anonymous call.
5150
constructors_callable.py:97:0 Revealed type [-1]: Revealed type for `r5` is `typing.Callable[[Variable(typing.Any), Keywords(typing.Any)], NoReturn]`.
52-
constructors_callable.py:117:8 Incompatible return type [7]: Expected `Class6Proxy` but got `Class6`.
5351
constructors_callable.py:125:0 Revealed type [-1]: Revealed type for `r6` is `typing.Callable[[Named(x, int)], Class6]`.
5452
constructors_callable.py:126:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `Class6Proxy` but got `Class6`.
5553
constructors_callable.py:126:12 Missing argument [20]: PositionalOnly call expects argument `x`.

0 commit comments

Comments
 (0)