Skip to content

Commit d19b1b2

Browse files
authored
Update conformance results after new pyre release (#1878)
update conformance results after new pyre release
1 parent b633be4 commit d19b1b2

File tree

90 files changed

+683
-1027
lines changed

Some content is hidden

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

90 files changed

+683
-1027
lines changed

conformance/results/mypy/version.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.13.0"
2-
test_duration = 2.6
2+
test_duration = 2.7

conformance/results/pyre/aliases_explicit.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ aliases_explicit.py:26:0 Incompatible variable type [9]: GoodTypeAlias12 is decl
1515
aliases_explicit.py:26:31 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, None]`.
1616
aliases_explicit.py:41:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.
1717
aliases_explicit.py:44:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias12` is not defined as a type.
18+
aliases_explicit.py:57:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`.
19+
aliases_explicit.py:60:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`.
1820
aliases_explicit.py:80:0 Incompatible variable type [9]: BadTypeAlias2 is declared to have type `TA` but is used as type `List[Type[Union[int, str]]]`.
1921
aliases_explicit.py:81:0 Incompatible variable type [9]: BadTypeAlias3 is declared to have type `TA` but is used as type `Tuple[Tuple[Type[int], Type[str]]]`.
2022
aliases_explicit.py:82:0 Incompatible variable type [9]: BadTypeAlias4 is declared to have type `TA` but is used as type `List[Type[int]]`.
@@ -44,5 +46,7 @@ Line 23: Unexpected errors ['aliases_explicit.py:23:0 Incompatible variable type
4446
Line 26: Unexpected errors ['aliases_explicit.py:26:0 Incompatible variable type [9]: GoodTypeAlias12 is declared to have type `TA` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'aliases_explicit.py:26:31 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, None]`.']
4547
Line 41: Unexpected errors ['aliases_explicit.py:41:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.']
4648
Line 44: Unexpected errors ['aliases_explicit.py:44:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias12` is not defined as a type.']
49+
Line 57: Unexpected errors ['aliases_explicit.py:57:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`.']
50+
Line 60: Unexpected errors ['aliases_explicit.py:60:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`.']
4751
Line 97: Unexpected errors ['aliases_explicit.py:97:16 Call error [29]: `TA` is not a function.']
4852
"""

conformance/results/pyre/aliases_implicit.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ aliases_implicit.py:38:26 Incompatible parameter type [6]: In call `typing.Gener
1212
aliases_implicit.py:42:27 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, None]`.
1313
aliases_implicit.py:54:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.
1414
aliases_implicit.py:58:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias13` is not defined as a type.
15+
aliases_implicit.py:68:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`.
16+
aliases_implicit.py:72:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`.
1517
aliases_implicit.py:106:8 Undefined or invalid type [11]: Annotation `BadTypeAlias1` is not defined as a type.
1618
aliases_implicit.py:107:8 Undefined or invalid type [11]: Annotation `BadTypeAlias2` is not defined as a type.
1719
aliases_implicit.py:108:8 Undefined or invalid type [11]: Annotation `BadTypeAlias3` is not defined as a type.
@@ -26,7 +28,7 @@ aliases_implicit.py:116:9 Undefined or invalid type [11]: Annotation `BadTypeAli
2628
aliases_implicit.py:117:9 Undefined or invalid type [11]: Annotation `BadTypeAlias12` is not defined as a type.
2729
aliases_implicit.py:118:9 Undefined or invalid type [11]: Annotation `BadTypeAlias13` is not defined as a type.
2830
aliases_implicit.py:119:9 Undefined or invalid type [11]: Annotation `BadTypeAlias14` is not defined as a type.
29-
aliases_implicit.py:131:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `List[int]` but got `typing.Any`.
31+
aliases_implicit.py:131:0 Assert type [70]: Expected `List[int]` but got `typing.Any`.
3032
"""
3133
conformance_automated = "Fail"
3234
errors_diff = """
@@ -42,5 +44,7 @@ Line 38: Unexpected errors ['aliases_implicit.py:38:26 Incompatible parameter ty
4244
Line 42: Unexpected errors ['aliases_implicit.py:42:27 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, None]`.']
4345
Line 54: Unexpected errors ['aliases_implicit.py:54:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.']
4446
Line 58: Unexpected errors ['aliases_implicit.py:58:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias13` is not defined as a type.']
45-
Line 131: Unexpected errors ['aliases_implicit.py:131:0 Incompatible parameter type [6]: In call `assert_type`, for 1st positional argument, expected `List[int]` but got `typing.Any`.']
47+
Line 68: Unexpected errors ['aliases_implicit.py:68:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`.']
48+
Line 72: Unexpected errors ['aliases_implicit.py:72:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`.']
49+
Line 131: Unexpected errors ['aliases_implicit.py:131:0 Assert type [70]: Expected `List[int]` but got `typing.Any`.']
4650
"""

conformance/results/pyre/aliases_newtype.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ aliases_newtype.py:38:5 Invalid type parameters [24]: Non-generic type `GoodNewT
1515
aliases_newtype.py:44:37 Invalid inheritance [39]: `typing.Union[int, str]` is not a valid parent class.
1616
aliases_newtype.py:51:37 Invalid inheritance [39]: `typing_extensions.Literal[7]` is not a valid parent class.
1717
aliases_newtype.py:60:14 Too many arguments [19]: Call `NewType.__init__` expects 2 positional arguments, 3 were provided.
18-
aliases_newtype.py:62:37 Invalid inheritance [39]: `typing.Any` is not a valid parent class.
1918
"""
2019
conformance_automated = "Fail"
2120
errors_diff = """
@@ -25,4 +24,5 @@ Line 32: Expected 1 errors
2524
Line 47: Expected 1 errors
2625
Line 49: Expected 1 errors
2726
Line 58: Expected 1 errors
27+
Line 62: Expected 1 errors
2828
"""

conformance/results/pyre/aliases_recursive.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ aliases_recursive.py:19:0 Incompatible variable type [9]: j4 is declared to have
88
aliases_recursive.py:20:0 Incompatible variable type [9]: j5 is declared to have type `aliases_recursive.Json (resolves to Union[None, Dict[str, Json], List[Json], float, int, str])` but is used as type `List[complex]`.
99
aliases_recursive.py:30:29 Undefined attribute [16]: `tuple` has no attribute `__getitem__`.
1010
aliases_recursive.py:33:4 Undefined or invalid type [11]: Annotation `RecursiveTuple` is not defined as a type.
11-
aliases_recursive.py:42:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_KT]], Type[Variable[_VT_co](covariant)]]` but got `Tuple[Type[str], str]`.
11+
aliases_recursive.py:42:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_KT]], Type[Variable[_VT_co]]]` but got `Tuple[Type[str], str]`.
1212
aliases_recursive.py:44:4 Undefined or invalid type [11]: Annotation `RecursiveMapping` is not defined as a type.
1313
aliases_recursive.py:58:20 Undefined attribute [16]: `list` has no attribute `__getitem__`.
1414
aliases_recursive.py:61:4 Undefined or invalid type [11]: Annotation `SpecializedTypeAlias1` is not defined as a type.
@@ -29,7 +29,7 @@ Line 63: Expected 1 errors
2929
Line 69: Expected 1 errors
3030
Line 30: Unexpected errors ['aliases_recursive.py:30:29 Undefined attribute [16]: `tuple` has no attribute `__getitem__`.']
3131
Line 33: Unexpected errors ['aliases_recursive.py:33:4 Undefined or invalid type [11]: Annotation `RecursiveTuple` is not defined as a type.']
32-
Line 42: Unexpected errors ['aliases_recursive.py:42:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_KT]], Type[Variable[_VT_co](covariant)]]` but got `Tuple[Type[str], str]`.']
32+
Line 42: Unexpected errors ['aliases_recursive.py:42:39 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Tuple[Type[Variable[_KT]], Type[Variable[_VT_co]]]` but got `Tuple[Type[str], str]`.']
3333
Line 44: Unexpected errors ['aliases_recursive.py:44:4 Undefined or invalid type [11]: Annotation `RecursiveMapping` is not defined as a type.']
3434
Line 58: Unexpected errors ['aliases_recursive.py:58:20 Undefined attribute [16]: `list` has no attribute `__getitem__`.']
3535
Line 61: Unexpected errors ['aliases_recursive.py:61:4 Undefined or invalid type [11]: Annotation `SpecializedTypeAlias1` is not defined as a type.']
Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
1-
conformant = "Unsupported"
1+
conformant = "Partial"
22
notes = """
3-
Does not support `type` statement.
3+
Does not complain when a type alias cannot be used as a base class.
4+
Does not complain when a type alias cannot be used as a function.
5+
Does not complain when a type statement definition combines new and old TypeVars.
6+
Does not complain when a type statement definition uses old TypeVars.
7+
Does not properly support recursive aliases.
48
"""
59
output = """
6-
aliases_type_statement.py:8:6 Parsing failure [404]: invalid syntax
10+
aliases_type_statement.py:37:0 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type.
11+
aliases_type_statement.py:38:0 Invalid type [31]: Expression `[int, str]` is not a valid type.
12+
aliases_type_statement.py:39:0 Invalid type [31]: Expression `((int, str))` is not a valid type.
13+
aliases_type_statement.py:40:0 Invalid type [31]: Expression `comprehension(int for generators(generator(i in range(1) if )))` is not a valid type.
14+
aliases_type_statement.py:41:0 Invalid type [31]: Expression `{ "a":"b" }` is not a valid type.
15+
aliases_type_statement.py:42:0 Invalid type [31]: Expression `lambda () (int)()` is not a valid type.
16+
aliases_type_statement.py:43:0 Invalid type [31]: Expression `[int][0]` is not a valid type.
17+
aliases_type_statement.py:44:0 Invalid type [31]: Expression `int if 1 < 3 else str` is not a valid type.
18+
aliases_type_statement.py:45:0 Undefined or invalid type [11]: Annotation `var1` is not defined as a type.
19+
aliases_type_statement.py:46:0 Invalid type [31]: Expression `True` is not a valid type.
20+
aliases_type_statement.py:47:0 Invalid type [31]: Expression `1` is not a valid type.
21+
aliases_type_statement.py:48:0 Invalid type [31]: Expression `list or set` is not a valid type.
22+
aliases_type_statement.py:49:0 Invalid type [31]: Expression `f"{"int"}"` is not a valid type.
23+
aliases_type_statement.py:72:0 Incompatible variable type [9]: r1_1 is declared to have type `aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[RecursiveTypeAlias1], T])], T])` but is used as type `int`.
24+
aliases_type_statement.py:73:0 Incompatible variable type [9]: r1_2 is declared to have type `aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[RecursiveTypeAlias1], T])], T])` but is used as type `List[Union[List[int], int]]`.
25+
aliases_type_statement.py:77:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(str, str, ...)]` is not a valid type.
26+
aliases_type_statement.py:78:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, ...)]` is not a valid type.
27+
aliases_type_statement.py:79:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, int, ...)]` is not a valid type.
28+
aliases_type_statement.py:80:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, [int, str])]` is not a valid type.
29+
aliases_type_statement.py:82:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias3` is not defined as a type.
30+
aliases_type_statement.py:84:0 Invalid type parameters [24]: Non-generic type `RecursiveTypeAlias4` cannot take parameters.
31+
aliases_type_statement.py:84:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias4` is not defined as a type.
32+
aliases_type_statement.py:88:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias7` is not defined as a type.
33+
aliases_type_statement.py:89:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias6` is not defined as a type.
734
"""
835
conformance_automated = "Fail"
936
errors_diff = """
@@ -12,27 +39,12 @@ Line 19: Expected 1 errors
1239
Line 23: Expected 1 errors
1340
Line 26: Expected 1 errors
1441
Line 31: Expected 1 errors
15-
Line 37: Expected 1 errors
16-
Line 38: Expected 1 errors
17-
Line 39: Expected 1 errors
18-
Line 40: Expected 1 errors
19-
Line 41: Expected 1 errors
20-
Line 42: Expected 1 errors
21-
Line 43: Expected 1 errors
22-
Line 44: Expected 1 errors
23-
Line 45: Expected 1 errors
24-
Line 46: Expected 1 errors
25-
Line 47: Expected 1 errors
26-
Line 48: Expected 1 errors
27-
Line 49: Expected 1 errors
2842
Line 56: Expected 1 errors
2943
Line 62: Expected 1 errors
3044
Line 67: Expected 1 errors
31-
Line 77: Expected 1 errors
32-
Line 79: Expected 1 errors
33-
Line 82: Expected 1 errors
34-
Line 84: Expected 1 errors
3545
Lines 51, 52: Expected error (tag 'TA14')
36-
Lines 88, 89: Expected error (tag 'RTA6')
37-
Line 8: Unexpected errors ['aliases_type_statement.py:8:6 Parsing failure [404]: invalid syntax']
46+
Line 72: Unexpected errors ['aliases_type_statement.py:72:0 Incompatible variable type [9]: r1_1 is declared to have type `aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[RecursiveTypeAlias1], T])], T])` but is used as type `int`.']
47+
Line 73: Unexpected errors ['aliases_type_statement.py:73:0 Incompatible variable type [9]: r1_2 is declared to have type `aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[aliases_type_statement.RecursiveTypeAlias1 (resolves to Union[List[RecursiveTypeAlias1], T])], T])` but is used as type `List[Union[List[int], int]]`.']
48+
Line 78: Unexpected errors ['aliases_type_statement.py:78:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, ...)]` is not a valid type.']
49+
Line 80: Unexpected errors ['aliases_type_statement.py:80:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, [int, str])]` is not a valid type.']
3850
"""

conformance/results/pyre/aliases_typealiastype.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ output = """
66
aliases_typealiastype.py:17:41 Undefined attribute [16]: `list` has no attribute `__getitem__`.
77
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]`.
88
aliases_typealiastype.py:22:65 Undefined attribute [16]: `tuple` has no attribute `__getitem__`.
9-
aliases_typealiastype.py:27:45 Undefined attribute [16]: `list` has no attribute `__getitem__`.
109
aliases_typealiastype.py:32:6 Undefined attribute [16]: `TypeAliasType` has no attribute `other_attrib`.
1110
aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type.
1211
aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a 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.
1412
"""
1513
conformance_automated = "Fail"
1614
errors_diff = """
@@ -36,8 +34,6 @@ Line 63: Expected 1 errors
3634
Line 64: Expected 1 errors
3735
Line 17: Unexpected errors ['aliases_typealiastype.py:17:41 Undefined attribute [16]: `list` has no attribute `__getitem__`.']
3836
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__`.']
39-
Line 27: Unexpected errors ['aliases_typealiastype.py:27:45 Undefined attribute [16]: `list` has no attribute `__getitem__`.']
4037
Line 35: Unexpected errors ['aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type.']
4138
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.']
4339
"""

conformance/results/pyre/aliases_variance.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
conformant = "Pass"
22
output = """
3-
aliases_variance.py:24:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.
4-
aliases_variance.py:28:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.
5-
aliases_variance.py:32:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.
6-
aliases_variance.py:44:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T]` because subclasses cannot use more permissive type variables than their superclasses.
3+
aliases_variance.py:24:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T](invariant)` because subclasses cannot use more permissive type variables than their superclasses.
4+
aliases_variance.py:28:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T](invariant)` because subclasses cannot use more permissive type variables than their superclasses.
5+
aliases_variance.py:32:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T](invariant)` because subclasses cannot use more permissive type variables than their superclasses.
6+
aliases_variance.py:44:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T](invariant)` because subclasses cannot use more permissive type variables than their superclasses.
77
"""
88
conformance_automated = "Pass"
99
errors_diff = """

0 commit comments

Comments
 (0)