Skip to content

Commit 5f8da04

Browse files
authored
Updated test results for pyre 0.9.22, mypy 1.10.1, and pyright 1.1.36… (#1788)
Updated test results for pyre 0.9.22, mypy 1.10.1, and pyright 1.1.369. The most substantive changes were with pyre, which fixed a bunch of bugs and improved error messages.
1 parent 149e62b commit 5f8da04

File tree

53 files changed

+368
-374
lines changed

Some content is hidden

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

53 files changed

+368
-374
lines changed

conformance/results/mypy/classes_classvar.toml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ Does not reject use of ClassVar in TypeAlias definition.
77
Does not infer type of ClassVar from assignment if no type is provided.
88
"""
99
output = """
10-
classes_classvar.py:37: error: ClassVar[...] must have at most one type argument [valid-type]
11-
classes_classvar.py:38: error: Invalid type: try using Literal[3] instead? [valid-type]
12-
classes_classvar.py:39: error: Name "var" is not defined [name-defined]
13-
classes_classvar.py:44: error: ClassVar cannot contain type variables [misc]
10+
classes_classvar.py:38: error: ClassVar[...] must have at most one type argument [valid-type]
11+
classes_classvar.py:39: error: Invalid type: try using Literal[3] instead? [valid-type]
12+
classes_classvar.py:40: error: Name "var" is not defined [name-defined]
1413
classes_classvar.py:45: error: ClassVar cannot contain type variables [misc]
15-
classes_classvar.py:51: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "list[str]") [assignment]
16-
classes_classvar.py:53: error: Variable should not be annotated with both ClassVar and Final [misc]
17-
classes_classvar.py:54: error: Invalid type: ClassVar nested inside other type [valid-type]
18-
classes_classvar.py:60: error: Invalid type: ClassVar nested inside other type [valid-type]
19-
classes_classvar.py:62: error: ClassVar can only be used for assignments in class body [misc]
14+
classes_classvar.py:46: error: ClassVar cannot contain type variables [misc]
15+
classes_classvar.py:52: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "list[str]") [assignment]
16+
classes_classvar.py:54: error: Variable should not be annotated with both ClassVar and Final [misc]
17+
classes_classvar.py:55: error: Invalid type: ClassVar nested inside other type [valid-type]
18+
classes_classvar.py:61: error: Invalid type: ClassVar nested inside other type [valid-type]
2019
classes_classvar.py:63: error: ClassVar can only be used for assignments in class body [misc]
2120
classes_classvar.py:64: error: ClassVar can only be used for assignments in class body [misc]
22-
classes_classvar.py:66: error: ClassVar can only be used for assignments in class body [misc]
23-
classes_classvar.py:70: error: ClassVar can only be used for assignments in class body [misc]
24-
classes_classvar.py:77: error: Expression is of type "Any", not "float" [assert-type]
25-
classes_classvar.py:101: error: Cannot assign to class variable "stats" via instance [misc]
26-
classes_classvar.py:130: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") [assignment]
27-
classes_classvar.py:130: note: "ProtoAImpl" is missing following "ProtoA" protocol member:
28-
classes_classvar.py:130: note: z
29-
classes_classvar.py:130: note: Protocol member ProtoA.x expected class variable, got instance variable
30-
classes_classvar.py:130: note: Protocol member ProtoA.y expected class variable, got instance variable
21+
classes_classvar.py:65: error: ClassVar can only be used for assignments in class body [misc]
22+
classes_classvar.py:67: error: ClassVar can only be used for assignments in class body [misc]
23+
classes_classvar.py:71: error: ClassVar can only be used for assignments in class body [misc]
24+
classes_classvar.py:78: error: Expression is of type "Any", not "float" [assert-type]
25+
classes_classvar.py:102: error: Cannot assign to class variable "stats" via instance [misc]
26+
classes_classvar.py:131: error: Incompatible types in assignment (expression has type "ProtoAImpl", variable has type "ProtoA") [assignment]
27+
classes_classvar.py:131: note: "ProtoAImpl" is missing following "ProtoA" protocol member:
28+
classes_classvar.py:131: note: z
29+
classes_classvar.py:131: note: Protocol member ProtoA.x expected class variable, got instance variable
30+
classes_classvar.py:131: note: Protocol member ProtoA.y expected class variable, got instance variable
3131
"""
3232
conformance_automated = "Fail"
3333
errors_diff = """
34-
Line 46: Expected 1 errors
35-
Line 71: Expected 1 errors
36-
Line 60: Unexpected errors ['classes_classvar.py:60: error: Invalid type: ClassVar nested inside other type [valid-type]']
37-
Line 77: Unexpected errors ['classes_classvar.py:77: error: Expression is of type "Any", not "float" [assert-type]']
34+
Line 47: Expected 1 errors
35+
Line 72: Expected 1 errors
36+
Line 61: Unexpected errors ['classes_classvar.py:61: error: Invalid type: ClassVar nested inside other type [valid-type]']
37+
Line 78: Unexpected errors ['classes_classvar.py:78: error: Expression is of type "Any", not "float" [assert-type]']
3838
"""

conformance/results/mypy/generics_paramspec_specialization.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
conformant = "Pass"
22
output = """
3-
generics_paramspec_specialization.py:45: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc]
4-
generics_paramspec_specialization.py:55: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]
5-
generics_paramspec_specialization.py:56: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type]
6-
generics_paramspec_specialization.py:61: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]
7-
generics_paramspec_specialization.py:62: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type]
3+
generics_paramspec_specialization.py:44: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "int" [misc]
4+
generics_paramspec_specialization.py:54: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]
5+
generics_paramspec_specialization.py:55: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type]
6+
generics_paramspec_specialization.py:60: error: Argument 1 has incompatible type "str"; expected "int" [arg-type]
7+
generics_paramspec_specialization.py:61: error: Argument 3 has incompatible type "str"; expected "bool" [arg-type]
88
"""
99
conformance_automated = "Pass"
1010
errors_diff = """

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.10.0"
2-
test_duration = 1.1
1+
version = "mypy 1.10.1"
2+
test_duration = 1.4

conformance/results/pyre/aliases_typealiastype.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ aliases_typealiastype.py:22:65 Undefined attribute [16]: `tuple` has no attribut
99
aliases_typealiastype.py:27:45 Undefined attribute [16]: `list` has no attribute `__getitem__`.
1010
aliases_typealiastype.py:32:6 Undefined attribute [16]: `TypeAliasType` has no attribute `other_attrib`.
1111
aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type.
12-
aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `...` is not defined as a type.
1312
aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a type.
14-
aliases_typealiastype.py:39:4 Invalid type [31]: Expression `$local_aliases_typealiastype$GoodAlias5[(int, str, [int, str], *tuple[(int, str, int)])]` is not a valid type.
13+
aliases_typealiastype.py:39:4 Invalid type [31]: Expression `GoodAlias5[(int, str, [int, str], *tuple[(int, str, int)])]` is not a valid type.
1514
"""
1615
conformance_automated = "Fail"
1716
errors_diff = """
@@ -39,6 +38,6 @@ Line 17: Unexpected errors ['aliases_typealiastype.py:17:41 Undefined attribute
3938
Line 22: Unexpected errors ['aliases_typealiastype.py:22:13 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[typing.Any, Type[Variable[$synthetic_attribute_resolution_variable]]]` but got `Tuple[ParamSpec, TypeVar]`.', 'aliases_typealiastype.py:22:65 Undefined attribute [16]: `tuple` has no attribute `__getitem__`.']
4039
Line 27: Unexpected errors ['aliases_typealiastype.py:27:45 Undefined attribute [16]: `list` has no attribute `__getitem__`.']
4140
Line 35: Unexpected errors ['aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type.']
42-
Line 37: Unexpected errors ['aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `...` is not defined as a type.', 'aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a type.']
43-
Line 39: Unexpected errors ['aliases_typealiastype.py:39:4 Invalid type [31]: Expression `$local_aliases_typealiastype$GoodAlias5[(int, str, [int, str], *tuple[(int, str, int)])]` is not a valid type.']
41+
Line 37: Unexpected errors ['aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a type.']
42+
Line 39: Unexpected errors ['aliases_typealiastype.py:39:4 Invalid type [31]: Expression `GoodAlias5[(int, str, [int, str], *tuple[(int, str, int)])]` is not a valid type.']
4443
"""

conformance/results/pyre/annotations_forward_refs.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ annotations_forward_refs.py:51:9 Invalid type [31]: Expression `"1"` is not a va
2222
annotations_forward_refs.py:52:9 Invalid type [31]: Expression `"-1"` is not a valid type.
2323
annotations_forward_refs.py:53:9 Invalid type [31]: Expression `"int or str"` is not a valid type.
2424
annotations_forward_refs.py:55:9 Undefined or invalid type [11]: Annotation `types` is not defined as a type.
25-
annotations_forward_refs.py:77:0 Uninitialized attribute [13]: Attribute `ClassC` is declared in class `ClassD` to have type `ClassC` but is never initialized.
25+
annotations_forward_refs.py:78:4 Uninitialized attribute [13]: Attribute `ClassC` is declared in class `ClassD` to have type `ClassC` but is never initialized.
2626
annotations_forward_refs.py:80:12 Undefined or invalid type [11]: Annotation `ClassF` is not defined as a type.
2727
annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type.
2828
annotations_forward_refs.py:100:7 Undefined or invalid type [11]: Annotation `
@@ -36,7 +36,7 @@ Line 25: Expected 1 errors
3636
Line 54: Expected 1 errors
3737
Line 66: Expected 1 errors
3838
Line 89: Expected 1 errors
39-
Line 77: Unexpected errors ['annotations_forward_refs.py:77:0 Uninitialized attribute [13]: Attribute `ClassC` is declared in class `ClassD` to have type `ClassC` but is never initialized.']
39+
Line 78: Unexpected errors ['annotations_forward_refs.py:78:4 Uninitialized attribute [13]: Attribute `ClassC` is declared in class `ClassD` to have type `ClassC` but is never initialized.']
4040
Line 87: Unexpected errors ['annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type.']
4141
Line 100: Unexpected errors ['annotations_forward_refs.py:100:7 Undefined or invalid type [11]: Annotation `']
4242
"""

conformance/results/pyre/annotations_typeexpr.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ output = """
33
annotations_typeexpr.py:88:8 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type.
44
annotations_typeexpr.py:89:8 Invalid type [31]: Expression `[int, str]` is not a valid type.
55
annotations_typeexpr.py:90:8 Invalid type [31]: Expression `(int, str)` is not a valid type.
6-
annotations_typeexpr.py:91:8 Invalid type [31]: Expression `comprehension(int for generators(generator($target$i in range(1) if )))` is not a valid type.
6+
annotations_typeexpr.py:91:8 Invalid type [31]: Expression `comprehension(int for generators(generator(i in range(1) if )))` is not a valid type.
77
annotations_typeexpr.py:92:8 Invalid type [31]: Expression `{ }` is not a valid type.
88
annotations_typeexpr.py:93:8 Invalid type [31]: Expression `lambda () (int)()` is not a valid type.
99
annotations_typeexpr.py:94:8 Invalid type [31]: Expression `[int][0]` is not a valid type.

conformance/results/pyre/callables_annotation.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
conformant = "Partial"
22
notes = """
33
Does not evaluate correct type for `*args: int` parameter.
4-
Does not reject illegal form `Callable[[...], int]`.
54
Does not correctly implement type compatibility rules for "...".
65
Does not treat "*args: Any, **kwargs: Any" as "...".
76
"""
@@ -15,10 +14,11 @@ callables_annotation.py:55:4 Invalid type [31]: Expression `typing.Callable[int]
1514
callables_annotation.py:56:4 Invalid type [31]: Expression `typing.Callable[(int, int)]` is not a valid type.
1615
callables_annotation.py:57:4 Invalid type [31]: Expression `typing.Callable[([], [int])]` is not a valid type.
1716
callables_annotation.py:58:4 Invalid type [31]: Expression `typing.Callable[(int, int, int)]` is not a valid type.
18-
callables_annotation.py:59:4 Undefined or invalid type [11]: Annotation `...` is not defined as a type.
17+
callables_annotation.py:59:4 Invalid type [31]: Expression `typing.Callable[([...], int)]` is not a valid type.
1918
callables_annotation.py:89:5 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], str)]` is not a valid type.
2019
callables_annotation.py:145:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type.
2120
callables_annotation.py:151:9 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type.
21+
callables_annotation.py:156:4 Incompatible variable type [9]: ok10 is declared to have type `Proto3` but is used as type `Proto4[[...]]`.
2222
callables_annotation.py:157:4 Incompatible variable type [9]: ok11 is declared to have type `Proto6` but is used as type `Proto7`.
2323
callables_annotation.py:159:4 Incompatible variable type [9]: err1 is declared to have type `Proto5[typing.Any]` but is used as type `Proto8`.
2424
callables_annotation.py:166:0 Incompatible variable type [9]: Callback1 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`.
@@ -39,6 +39,7 @@ Line 93: Expected 1 errors
3939
Line 89: Unexpected errors ['callables_annotation.py:89:5 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], str)]` is not a valid type.']
4040
Line 145: Unexpected errors ['callables_annotation.py:145:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type.']
4141
Line 151: Unexpected errors ['callables_annotation.py:151:9 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type.']
42+
Line 156: Unexpected errors ['callables_annotation.py:156:4 Incompatible variable type [9]: ok10 is declared to have type `Proto3` but is used as type `Proto4[[...]]`.']
4243
Line 157: Unexpected errors ['callables_annotation.py:157:4 Incompatible variable type [9]: ok11 is declared to have type `Proto6` but is used as type `Proto7`.']
4344
Line 166: Unexpected errors ['callables_annotation.py:166:0 Incompatible variable type [9]: Callback1 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`.']
4445
Line 167: Unexpected errors ['callables_annotation.py:167:0 Incompatible variable type [9]: Callback2 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`.']

conformance/results/pyre/classes_classvar.toml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,30 @@ Does not reject use of ClassVar in type alias definition.
1111
Does not infer type from initialization for bare ClassVar.
1212
"""
1313
output = """
14-
classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad1` is declared in class `ClassA` to have type `typing.Any` but is never initialized.
15-
classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad4` is declared in class `ClassA` to have type `Variable[T]` but is never initialized.
16-
classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad5` is declared in class `ClassA` to have type `typing.List[Variable[T]]` but is never initialized.
17-
classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad6` is declared in class `ClassA` to have type `typing.Callable[classes_classvar.P, typing.Any]` but is never initialized.
18-
classes_classvar.py:37:10 Invalid type parameters [24]: Generic type `CV` expects 1 type parameter, received 2.
19-
classes_classvar.py:38:10 Invalid type [31]: Expression `typing.ClassVar[3]` is not a valid type.
20-
classes_classvar.py:39:13 Unbound name [10]: Name `var` is used but not defined in the current scope.
21-
classes_classvar.py:51:4 Incompatible attribute type [8]: Attribute `bad8` declared in class `ClassA` has type `List[str]` but is used as type `Dict[Variable[_KT], Variable[_VT]]`.
22-
classes_classvar.py:64:8 Undefined attribute [16]: `ClassA` has no attribute `xx`.
23-
classes_classvar.py:67:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.
24-
classes_classvar.py:77:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `float` but got `typing.Any`.
25-
classes_classvar.py:80:0 Uninitialized attribute [13]: Attribute `damage` is declared in class `BasicStarship` to have type `int` but is never initialized.
26-
classes_classvar.py:101:0 Invalid assignment [41]: Assigning to class variable through instance, did you mean to assign to `Starship.stats` instead?
27-
classes_classvar.py:130:0 Incompatible variable type [9]: a is declared to have type `ProtoA` but is used as type `ProtoAImpl`.
14+
classes_classvar.py:38:10 Invalid type parameters [24]: Generic type `CV` expects 1 type parameter, received 2.
15+
classes_classvar.py:39:10 Invalid type [31]: Expression `typing.ClassVar[3]` is not a valid type.
16+
classes_classvar.py:40:13 Unbound name [10]: Name `var` is used but not defined in the current scope.
17+
classes_classvar.py:52:4 Incompatible attribute type [8]: Attribute `bad8` declared in class `ClassA` has type `List[str]` but is used as type `Dict[Variable[_KT], Variable[_VT]]`.
18+
classes_classvar.py:65:8 Undefined attribute [16]: `ClassA` has no attribute `xx`.
19+
classes_classvar.py:68:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.
20+
classes_classvar.py:78:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `float` but got `typing.Any`.
21+
classes_classvar.py:83:4 Uninitialized attribute [13]: Attribute `damage` is declared in class `BasicStarship` to have type `int` but is never initialized.
22+
classes_classvar.py:102:0 Invalid assignment [41]: Assigning to class variable through instance, did you mean to assign to `Starship.stats` instead?
23+
classes_classvar.py:131:0 Incompatible variable type [9]: a is declared to have type `ProtoA` but is used as type `ProtoAImpl`.
2824
"""
2925
conformance_automated = "Fail"
3026
errors_diff = """
31-
Line 44: Expected 1 errors
3227
Line 45: Expected 1 errors
3328
Line 46: Expected 1 errors
34-
Line 53: Expected 1 errors
29+
Line 47: Expected 1 errors
3530
Line 54: Expected 1 errors
36-
Line 62: Expected 1 errors
31+
Line 55: Expected 1 errors
3732
Line 63: Expected 1 errors
38-
Line 66: Expected 1 errors
39-
Line 70: Expected 1 errors
33+
Line 64: Expected 1 errors
34+
Line 67: Expected 1 errors
4035
Line 71: Expected 1 errors
41-
Line 34: Unexpected errors ['classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad1` is declared in class `ClassA` to have type `typing.Any` but is never initialized.', 'classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad4` is declared in class `ClassA` to have type `Variable[T]` but is never initialized.', 'classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad5` is declared in class `ClassA` to have type `typing.List[Variable[T]]` but is never initialized.', 'classes_classvar.py:34:0 Uninitialized attribute [13]: Attribute `bad6` is declared in class `ClassA` to have type `typing.Callable[classes_classvar.P, typing.Any]` but is never initialized.']
42-
Line 67: Unexpected errors ['classes_classvar.py:67:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.']
43-
Line 77: Unexpected errors ['classes_classvar.py:77:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `float` but got `typing.Any`.']
44-
Line 80: Unexpected errors ['classes_classvar.py:80:0 Uninitialized attribute [13]: Attribute `damage` is declared in class `BasicStarship` to have type `int` but is never initialized.']
36+
Line 72: Expected 1 errors
37+
Line 68: Unexpected errors ['classes_classvar.py:68:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.']
38+
Line 78: Unexpected errors ['classes_classvar.py:78:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `float` but got `typing.Any`.']
39+
Line 83: Unexpected errors ['classes_classvar.py:83:4 Uninitialized attribute [13]: Attribute `damage` is declared in class `BasicStarship` to have type `int` but is never initialized.']
4540
"""

0 commit comments

Comments
 (0)