diff --git a/conformance/.gitignore b/conformance/.gitignore index 5eae7a45..6a000697 100644 --- a/conformance/.gitignore +++ b/conformance/.gitignore @@ -32,8 +32,6 @@ MANIFEST # Tools .mypy_cache -.pyre_configuration -.pyre .coverage htmlcov diff --git a/conformance/README.md b/conformance/README.md index a5a45b7e..e0302c80 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -75,13 +75,12 @@ To run the conformance test suite: * Switch to the `src` subdirectory and run `python main.py`. Note that some type checkers may not run on some platforms. If a type checker fails to install, tests will be skipped for that type checker. -Currently, the only unsupported type checker is Pyre on Windows. ## Reporting Conformance Results Different type checkers report errors in different ways (with different wording in error messages and different line numbers or character ranges for errors). This variation makes it difficult to fully automate test validation given that tests will want to check for both false positive and false negative type errors. Some level of manual inspection will therefore be needed to determine whether a type checker is fully conformant with all tests in any given test file. This "scoring" process is required only when the output of a test changes — e.g. when a new version of that type checker is released and the tests are rerun. We assume that the output of a type checker will be the same from one run to the next unless/until a new version is released that fixes or introduces a bug. In this case, the output will need to be manually inspected and the conformance results re-scored for those tests whose output has changed. -Conformance results are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyre, and pyright. It is the goal and desire to add additional type checkers over time. +Conformance results are reported and summarized for each supported type checker. Currently, results are reported for mypy, pyrefly, pyright, and zuban. It is the goal and desire to add additional type checkers over time. ## Adding a New Test Case diff --git a/conformance/requirements.txt b/conformance/requirements.txt index cf7ee585..eac56a05 100644 --- a/conformance/requirements.txt +++ b/conformance/requirements.txt @@ -3,6 +3,5 @@ tomlkit pyright mypy pip -pyre-check; platform_system != "Windows" zuban pyrefly diff --git a/conformance/results/pyre/aliases_explicit.toml b/conformance/results/pyre/aliases_explicit.toml deleted file mode 100644 index 1ed27f71..00000000 --- a/conformance/results/pyre/aliases_explicit.toml +++ /dev/null @@ -1,52 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. -Incorrectly rejects some valid type aliases when used in annotations. -Incorrectly evaluates generic type alias with ParamSpec with missing type argument. -Does not report some illegal annotation forms as invalid type aliases. -Does not report invalid specialization of generic type aliases. -Incorrectly rejects import alias of `TypeAlias` when used to define type alias. -Does not report invalid specialization of already-specialized generic type alias. -""" -output = """ -aliases_explicit.py:23:0 Incompatible variable type [9]: GoodTypeAlias9 is declared to have type `TA` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`. -aliases_explicit.py:23:30 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[object, TypeVar]`. -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]`. -aliases_explicit.py:41:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type. -aliases_explicit.py:44:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias12` is not defined as a type. -aliases_explicit.py:57:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`. -aliases_explicit.py:60:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`. -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]]]`. -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]]]`. -aliases_explicit.py:82:0 Incompatible variable type [9]: BadTypeAlias4 is declared to have type `TA` but is used as type `List[Type[int]]`. -aliases_explicit.py:83:0 Incompatible variable type [9]: BadTypeAlias5 is declared to have type `TA` but is used as type `Dict[str, str]`. -aliases_explicit.py:84:0 Incompatible variable type [9]: BadTypeAlias6 is declared to have type `TA` but is used as type `Type[int]`. -aliases_explicit.py:85:0 Incompatible variable type [9]: BadTypeAlias7 is declared to have type `TA` but is used as type `Type[int]`. -aliases_explicit.py:86:0 Incompatible variable type [9]: BadTypeAlias8 is declared to have type `TA` but is used as type `Type[Union[int, str]]`. -aliases_explicit.py:87:0 Incompatible variable type [9]: BadTypeAlias9 is declared to have type `TA` but is used as type `int`. -aliases_explicit.py:88:0 Incompatible variable type [9]: BadTypeAlias10 is declared to have type `TA` but is used as type `bool`. -aliases_explicit.py:89:0 Incompatible variable type [9]: BadTypeAlias11 is declared to have type `TA` but is used as type `int`. -aliases_explicit.py:90:0 Incompatible variable type [9]: BadTypeAlias12 is declared to have type `TA` but is used as type `Type[Union[list, set]]`. -aliases_explicit.py:91:0 Incompatible variable type [9]: BadTypeAlias13 is declared to have type `TA` but is used as type `str`. -aliases_explicit.py:97:16 Call error [29]: `TA` is not a function. -aliases_explicit.py:101:5 Call error [29]: `TA` is not a function. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 67: Expected 1 errors -Line 68: Expected 1 errors -Line 69: Expected 1 errors -Line 70: Expected 1 errors -Line 71: Expected 1 errors -Line 79: Expected 1 errors -Line 100: Expected 1 errors -Line 102: Expected 1 errors -Line 23: Unexpected errors ['aliases_explicit.py:23:0 Incompatible variable type [9]: GoodTypeAlias9 is declared to have type `TA` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'aliases_explicit.py:23:30 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[object, TypeVar]`.'] -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]`.'] -Line 41: Unexpected errors ['aliases_explicit.py:41:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.'] -Line 44: Unexpected errors ['aliases_explicit.py:44:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias12` is not defined as a type.'] -Line 57: Unexpected errors ['aliases_explicit.py:57:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`.'] -Line 60: Unexpected errors ['aliases_explicit.py:60:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`.'] -Line 97: Unexpected errors ['aliases_explicit.py:97:16 Call error [29]: `TA` is not a function.'] -""" diff --git a/conformance/results/pyre/aliases_implicit.toml b/conformance/results/pyre/aliases_implicit.toml deleted file mode 100644 index 322c2932..00000000 --- a/conformance/results/pyre/aliases_implicit.toml +++ /dev/null @@ -1,50 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly reports error for type alias defined with ParamSpec. -Incorrectly rejects some valid type aliases when used in annotations. -Incorrectly evaluates generic type alias with ParamSpec with missing type argument. -Does not report invalid specialization of generic type aliases. -Does not report error for attempt to instantiate union type alias. -Does not report invalid specialization of already-specialized generic type alias. -""" -output = """ -aliases_implicit.py:38:26 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[object, TypeVar]`. -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]`. -aliases_implicit.py:54:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type. -aliases_implicit.py:58:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias13` is not defined as a type. -aliases_implicit.py:68:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`. -aliases_implicit.py:72:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`. -aliases_implicit.py:106:8 Undefined or invalid type [11]: Annotation `BadTypeAlias1` is not defined as a type. -aliases_implicit.py:107:8 Undefined or invalid type [11]: Annotation `BadTypeAlias2` is not defined as a type. -aliases_implicit.py:108:8 Undefined or invalid type [11]: Annotation `BadTypeAlias3` is not defined as a type. -aliases_implicit.py:109:8 Undefined or invalid type [11]: Annotation `BadTypeAlias4` is not defined as a type. -aliases_implicit.py:110:8 Undefined or invalid type [11]: Annotation `BadTypeAlias5` is not defined as a type. -aliases_implicit.py:111:8 Undefined or invalid type [11]: Annotation `BadTypeAlias6` is not defined as a type. -aliases_implicit.py:112:8 Undefined or invalid type [11]: Annotation `BadTypeAlias7` is not defined as a type. -aliases_implicit.py:113:8 Undefined or invalid type [11]: Annotation `BadTypeAlias8` is not defined as a type. -aliases_implicit.py:114:8 Undefined or invalid type [11]: Annotation `BadTypeAlias9` is not defined as a type. -aliases_implicit.py:115:9 Undefined or invalid type [11]: Annotation `BadTypeAlias10` is not defined as a type. -aliases_implicit.py:116:9 Undefined or invalid type [11]: Annotation `BadTypeAlias11` is not defined as a type. -aliases_implicit.py:117:9 Undefined or invalid type [11]: Annotation `BadTypeAlias12` is not defined as a type. -aliases_implicit.py:118:9 Undefined or invalid type [11]: Annotation `BadTypeAlias13` is not defined as a type. -aliases_implicit.py:119:9 Undefined or invalid type [11]: Annotation `BadTypeAlias14` is not defined as a type. -aliases_implicit.py:131:0 Assert type [70]: Expected `List[int]` but got `typing.Any`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 76: Expected 1 errors -Line 77: Expected 1 errors -Line 78: Expected 1 errors -Line 79: Expected 1 errors -Line 80: Expected 1 errors -Line 81: Expected 1 errors -Line 133: Expected 1 errors -Line 135: Expected 1 errors -Line 38: Unexpected errors ['aliases_implicit.py:38:26 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[object, TypeVar]`.'] -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]`.'] -Line 54: Unexpected errors ['aliases_implicit.py:54:8 Undefined or invalid type [11]: Annotation `GoodTypeAlias9` is not defined as a type.'] -Line 58: Unexpected errors ['aliases_implicit.py:58:9 Undefined or invalid type [11]: Annotation `GoodTypeAlias13` is not defined as a type.'] -Line 68: Unexpected errors ['aliases_implicit.py:68:4 Assert type [70]: Expected `typing.Callable[[int, str, str], None]` but got `unknown`.'] -Line 72: Unexpected errors ['aliases_implicit.py:72:4 Assert type [70]: Expected `typing.Callable[..., None]` but got `unknown`.'] -Line 131: Unexpected errors ['aliases_implicit.py:131:0 Assert type [70]: Expected `List[int]` but got `typing.Any`.'] -""" diff --git a/conformance/results/pyre/aliases_newtype.toml b/conformance/results/pyre/aliases_newtype.toml deleted file mode 100644 index 9dada230..00000000 --- a/conformance/results/pyre/aliases_newtype.toml +++ /dev/null @@ -1,29 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of NewType in `isinstance` call. -Does not reject use of NewType in class definition statement. -Does not report inconsistency between name of NewType and assigned identifier name. -Does not reject use of NewType with generic class with TypeVar. -Does not reject use of NewType with protocol class. -Does not reject use of NewType with TypedDict class. -Does not reject use of NewType with Any. -""" -output = """ -aliases_newtype.py:11:7 Incompatible parameter type [6]: In call `UserId.__init__`, for 1st positional argument, expected `int` but got `str`. -aliases_newtype.py:12:0 Incompatible variable type [9]: u1 is declared to have type `UserId` but is used as type `int`. -aliases_newtype.py:41:5 Invalid type parameters [24]: Non-generic type `GoodNewType1` cannot take parameters. -aliases_newtype.py:47:37 Invalid inheritance [39]: `typing.Union[int, str]` is not a valid parent class. -aliases_newtype.py:54:37 Invalid inheritance [39]: `typing_extensions.Literal[7]` is not a valid parent class. -aliases_newtype.py:63:14 Too many arguments [19]: Call `NewType.__init__` expects 2 positional arguments, 3 were provided. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 18: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 35: Expected 1 errors -Line 50: Expected 1 errors -Line 52: Expected 1 errors -Line 61: Expected 1 errors -Line 65: Expected 1 errors -""" diff --git a/conformance/results/pyre/aliases_recursive.toml b/conformance/results/pyre/aliases_recursive.toml deleted file mode 100644 index 69aeafb1..00000000 --- a/conformance/results/pyre/aliases_recursive.toml +++ /dev/null @@ -1,38 +0,0 @@ -conformant = "Partial" -notes = """ -Does not properly handle some recursive type aliases. -Does not properly handle specialization of generic recursive type aliases. -""" -output = """ -aliases_recursive.py:19:0 Incompatible variable type [9]: j4 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 `Dict[str, complex]`. -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]`. -aliases_recursive.py:30:29 Undefined attribute [16]: `tuple` has no attribute `__getitem__`. -aliases_recursive.py:33:4 Undefined or invalid type [11]: Annotation `RecursiveTuple` is not defined as a type. -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]`. -aliases_recursive.py:44:4 Undefined or invalid type [11]: Annotation `RecursiveMapping` is not defined as a type. -aliases_recursive.py:58:20 Undefined attribute [16]: `list` has no attribute `__getitem__`. -aliases_recursive.py:61:4 Undefined or invalid type [11]: Annotation `SpecializedTypeAlias1` is not defined as a type. -aliases_recursive.py:62:4 Undefined or invalid type [11]: Annotation `GenericTypeAlias1` is not defined as a type. -aliases_recursive.py:67:4 Undefined or invalid type [11]: Annotation `GenericTypeAlias2` is not defined as a type. -aliases_recursive.py:72:0 Incompatible variable type [9]: RecursiveUnion is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`. -aliases_recursive.py:75:0 Incompatible variable type [9]: MutualReference1 is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`. -aliases_recursive.py:75:62 Incompatible variable type [9]: MutualReference2 is declared to have type `TypeAlias` but is used as type `Type[typing.Any]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 38: Expected 1 errors -Line 39: Expected 1 errors -Line 50: Expected 1 errors -Line 51: Expected 1 errors -Line 52: Expected 1 errors -Line 63: Expected 1 errors -Line 69: Expected 1 errors -Line 30: Unexpected errors ['aliases_recursive.py:30:29 Undefined attribute [16]: `tuple` has no attribute `__getitem__`.'] -Line 33: Unexpected errors ['aliases_recursive.py:33:4 Undefined or invalid type [11]: Annotation `RecursiveTuple` is not defined as a type.'] -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]`.'] -Line 44: Unexpected errors ['aliases_recursive.py:44:4 Undefined or invalid type [11]: Annotation `RecursiveMapping` is not defined as a type.'] -Line 58: Unexpected errors ['aliases_recursive.py:58:20 Undefined attribute [16]: `list` has no attribute `__getitem__`.'] -Line 61: Unexpected errors ['aliases_recursive.py:61:4 Undefined or invalid type [11]: Annotation `SpecializedTypeAlias1` is not defined as a type.'] -Line 62: Unexpected errors ['aliases_recursive.py:62:4 Undefined or invalid type [11]: Annotation `GenericTypeAlias1` is not defined as a type.'] -Line 67: Unexpected errors ['aliases_recursive.py:67:4 Undefined or invalid type [11]: Annotation `GenericTypeAlias2` is not defined as a type.'] -""" diff --git a/conformance/results/pyre/aliases_type_statement.toml b/conformance/results/pyre/aliases_type_statement.toml deleted file mode 100644 index e3ce7deb..00000000 --- a/conformance/results/pyre/aliases_type_statement.toml +++ /dev/null @@ -1,50 +0,0 @@ -conformant = "Partial" -notes = """ -Does not complain when a type alias cannot be used as a base class. -Does not complain when a type alias cannot be used as a function. -Does not complain when a type statement definition combines new and old TypeVars. -Does not complain when a type statement definition uses old TypeVars. -Does not properly support recursive aliases. -""" -output = """ -aliases_type_statement.py:37:0 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type. -aliases_type_statement.py:38:0 Invalid type [31]: Expression `[int, str]` is not a valid type. -aliases_type_statement.py:39:0 Invalid type [31]: Expression `((int, str))` is not a valid type. -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. -aliases_type_statement.py:41:0 Invalid type [31]: Expression `{ "a":"b" }` is not a valid type. -aliases_type_statement.py:42:0 Invalid type [31]: Expression `lambda () (int)()` is not a valid type. -aliases_type_statement.py:43:0 Invalid type [31]: Expression `[int][0]` is not a valid type. -aliases_type_statement.py:44:0 Invalid type [31]: Expression `int if 1 < 3 else str` is not a valid type. -aliases_type_statement.py:45:0 Undefined or invalid type [11]: Annotation `var1` is not defined as a type. -aliases_type_statement.py:46:0 Invalid type [31]: Expression `True` is not a valid type. -aliases_type_statement.py:47:0 Invalid type [31]: Expression `1` is not a valid type. -aliases_type_statement.py:48:0 Invalid type [31]: Expression `list or set` is not a valid type. -aliases_type_statement.py:49:0 Invalid type [31]: Expression `f"{"int"}"` is not a valid type. -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`. -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]]`. -aliases_type_statement.py:77:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(str, str, ...)]` is not a valid type. -aliases_type_statement.py:78:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, ...)]` is not a valid type. -aliases_type_statement.py:79:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, int, ...)]` is not a valid type. -aliases_type_statement.py:80:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, [int, str])]` is not a valid type. -aliases_type_statement.py:82:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias3` is not defined as a type. -aliases_type_statement.py:84:0 Invalid type parameters [24]: Non-generic type `RecursiveTypeAlias4` cannot take parameters. -aliases_type_statement.py:84:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias4` is not defined as a type. -aliases_type_statement.py:88:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias7` is not defined as a type. -aliases_type_statement.py:89:0 Undefined or invalid type [11]: Annotation `RecursiveTypeAlias6` is not defined as a type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 17: Expected 1 errors -Line 19: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 31: Expected 1 errors -Line 56: Expected 1 errors -Line 62: Expected 1 errors -Line 67: Expected 1 errors -Lines 51, 52: Expected error (tag 'TA14') -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`.'] -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]]`.'] -Line 78: Unexpected errors ['aliases_type_statement.py:78:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, ...)]` is not a valid type.'] -Line 80: Unexpected errors ['aliases_type_statement.py:80:6 Invalid type [31]: Expression `RecursiveTypeAlias2[(int, str, [int, str])]` is not a valid type.'] -""" diff --git a/conformance/results/pyre/aliases_typealiastype.toml b/conformance/results/pyre/aliases_typealiastype.toml deleted file mode 100644 index ed9e9178..00000000 --- a/conformance/results/pyre/aliases_typealiastype.toml +++ /dev/null @@ -1,40 +0,0 @@ -conformant = "Unsupported" -notes = """ -Support for TypeAliasType is not implemented. -""" -output = """ -aliases_typealiastype.py:17:41 Undefined attribute [16]: `list` has no attribute `__getitem__`. -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:67 Undefined attribute [16]: `tuple` has no attribute `__getitem__`. -aliases_typealiastype.py:32:6 Undefined attribute [16]: `TypeAliasType` has no attribute `other_attrib`. -aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type. -aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 40: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 52: Expected 1 errors -Line 53: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 56: Expected 1 errors -Line 57: Expected 1 errors -Line 58: Expected 1 errors -Line 59: Expected 1 errors -Line 60: Expected 1 errors -Line 61: Expected 1 errors -Line 62: Expected 1 errors -Line 63: Expected 1 errors -Line 64: Expected 1 errors -Line 66: Expected 1 errors -Line 17: Unexpected errors ['aliases_typealiastype.py:17:41 Undefined attribute [16]: `list` has no attribute `__getitem__`.'] -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:67 Undefined attribute [16]: `tuple` has no attribute `__getitem__`.'] -Line 35: Unexpected errors ['aliases_typealiastype.py:35:4 Undefined or invalid type [11]: Annotation `GoodAlias4` is not defined as a type.'] -Line 37: Unexpected errors ['aliases_typealiastype.py:37:4 Undefined or invalid type [11]: Annotation `GoodAlias5` is not defined as a type.'] -""" diff --git a/conformance/results/pyre/aliases_variance.toml b/conformance/results/pyre/aliases_variance.toml deleted file mode 100644 index a5492b60..00000000 --- a/conformance/results/pyre/aliases_variance.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -output = """ -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. -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. -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. -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. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/annotations_coroutines.toml b/conformance/results/pyre/annotations_coroutines.toml deleted file mode 100644 index 5e485e85..00000000 --- a/conformance/results/pyre/annotations_coroutines.toml +++ /dev/null @@ -1,6 +0,0 @@ -conformant = "Pass" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/annotations_forward_refs.toml b/conformance/results/pyre/annotations_forward_refs.toml deleted file mode 100644 index 047537bc..00000000 --- a/conformance/results/pyre/annotations_forward_refs.toml +++ /dev/null @@ -1,39 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report error for a forward reference that is not enclosed in quotes. -Does not report error for use of quoted type with "|" operator (runtime error). -Does not reject f-string in quoted type annotation. -Incorrectly generates error for quoted type defined in class scope. -Does not generate error for unquoted type defined in class scope. -Does not treat triple-quoted forward reference annotation as implicitly parenthesized. -""" -output = """ -annotations_forward_refs.py:41:8 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type. -annotations_forward_refs.py:42:8 Invalid type [31]: Expression `"[int, str]"` is not a valid type. -annotations_forward_refs.py:43:8 Invalid type [31]: Expression `"(int, str)"` is not a valid type. -annotations_forward_refs.py:44:8 Undefined or invalid type [11]: Annotation `comprehension(int for generators(generator($target$i in range(1) if )))` is not defined as a type. -annotations_forward_refs.py:45:8 Invalid type [31]: Expression `"{ }"` is not a valid type. -annotations_forward_refs.py:46:8 Invalid type [31]: Expression `lambda () (int)()` is not a valid type. -annotations_forward_refs.py:47:8 Invalid type [31]: Expression `[int][0]` is not a valid type. -annotations_forward_refs.py:48:8 Invalid type [31]: Expression `"int if 1 < 3 else str"` is not a valid type. -annotations_forward_refs.py:49:8 Undefined or invalid type [11]: Annotation `var1` is not defined as a type. -annotations_forward_refs.py:50:9 Invalid type [31]: Expression `"True"` is not a valid type. -annotations_forward_refs.py:51:9 Invalid type [31]: Expression `"1"` is not a valid type. -annotations_forward_refs.py:52:9 Invalid type [31]: Expression `"-1"` is not a valid type. -annotations_forward_refs.py:53:9 Invalid type [31]: Expression `"int or str"` is not a valid type. -annotations_forward_refs.py:55:9 Undefined or invalid type [11]: Annotation `types` is not defined as a type. -annotations_forward_refs.py:80:12 Undefined or invalid type [11]: Annotation `ClassF` is not defined as a type. -annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type. -annotations_forward_refs.py:96:0 Assert type [70]: Expected `int` but got `unknown`. -annotations_forward_refs.py:103:7 Undefined or invalid type [11]: Annotation ` -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 54: Expected 1 errors -Line 89: Expected 1 errors -Line 87: Unexpected errors ['annotations_forward_refs.py:87:7 Undefined or invalid type [11]: Annotation `ClassD.int` is not defined as a type.'] -Line 96: Unexpected errors ['annotations_forward_refs.py:96:0 Assert type [70]: Expected `int` but got `unknown`.'] -Line 103: Unexpected errors ['annotations_forward_refs.py:103:7 Undefined or invalid type [11]: Annotation `'] -""" diff --git a/conformance/results/pyre/annotations_generators.toml b/conformance/results/pyre/annotations_generators.toml deleted file mode 100644 index 865d139d..00000000 --- a/conformance/results/pyre/annotations_generators.toml +++ /dev/null @@ -1,26 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report invalid return type for generator when function implicitly returns None. -Incorrectly evaluates type of call to async generator. -""" -output = """ -annotations_generators.py:54:8 Incompatible return type [7]: Expected `Generator[A, B, C]` but got `Generator[typing.Any, typing.Any, bool]`. -annotations_generators.py:57:8 Incompatible return type [7]: Expected `Generator[A, B, C]` but got `Generator[int, typing.Any, typing.Any]`. -annotations_generators.py:66:8 Incompatible return type [7]: Expected `Generator[A, int, typing.Any]` but got `Generator[int, typing.Any, typing.Any]`. -annotations_generators.py:75:4 Incompatible return type [7]: Expected `Iterator[A]` but got `Generator[B, typing.Any, typing.Any]`. -annotations_generators.py:87:4 Incompatible return type [7]: Expected `int` but got `Generator[None, typing.Any, typing.Any]`. -annotations_generators.py:88:4 Incompatible return type [7]: Expected `int` but got `Generator[typing.Any, typing.Any, int]`. -annotations_generators.py:91:0 Incompatible async generator return type [57]: Expected return annotation to be AsyncGenerator or a superclass but got `int`. -annotations_generators.py:92:4 Incompatible return type [7]: Expected `int` but got `AsyncGenerator[None, typing.Any]`. -annotations_generators.py:118:4 Incompatible return type [7]: Expected `Iterator[B]` but got `Generator[A, None, typing.Any]`. -annotations_generators.py:119:4 Incompatible return type [7]: Expected `Iterator[B]` but got `Generator[int, None, typing.Any]`. -annotations_generators.py:135:4 Incompatible return type [7]: Expected `Generator[None, str, None]` but got `Generator[None, int, typing.Any]`. -annotations_generators.py:185:0 Incompatible variable type [9]: v1 is declared to have type `typing.Callable[[], Coroutine[typing.Any, typing.Any, AsyncIterator[int]]]` but is used as type `typing.Callable(generator29)[[], AsyncIterator[int]]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 51: Expected 1 errors -Line 86: Expected 1 errors -Line 88: Unexpected errors ['annotations_generators.py:88:4 Incompatible return type [7]: Expected `int` but got `Generator[typing.Any, typing.Any, int]`.'] -Line 185: Unexpected errors ['annotations_generators.py:185:0 Incompatible variable type [9]: v1 is declared to have type `typing.Callable[[], Coroutine[typing.Any, typing.Any, AsyncIterator[int]]]` but is used as type `typing.Callable(generator29)[[], AsyncIterator[int]]`.'] -""" diff --git a/conformance/results/pyre/annotations_methods.toml b/conformance/results/pyre/annotations_methods.toml deleted file mode 100644 index 4c131204..00000000 --- a/conformance/results/pyre/annotations_methods.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -notes = """ -Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings. -""" -output = """ -annotations_methods.py:42:0 Assert type [70]: Expected `A` but got `B`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/annotations_typeexpr.toml b/conformance/results/pyre/annotations_typeexpr.toml deleted file mode 100644 index 457e5a3d..00000000 --- a/conformance/results/pyre/annotations_typeexpr.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Pass" -output = """ -annotations_typeexpr.py:88:8 Invalid type [31]: Expression `eval("".join(map(chr, [105, 110, 116])))` is not a valid type. -annotations_typeexpr.py:89:8 Invalid type [31]: Expression `[int, str]` is not a valid type. -annotations_typeexpr.py:90:8 Invalid type [31]: Expression `(int, str)` is not a valid type. -annotations_typeexpr.py:91:8 Invalid type [31]: Expression `comprehension(int for generators(generator(i in range(1) if )))` is not a valid type. -annotations_typeexpr.py:92:8 Invalid type [31]: Expression `{ }` is not a valid type. -annotations_typeexpr.py:93:8 Invalid type [31]: Expression `lambda () (int)()` is not a valid type. -annotations_typeexpr.py:94:8 Invalid type [31]: Expression `[int][0]` is not a valid type. -annotations_typeexpr.py:95:8 Invalid type [31]: Expression `int if 1 < 3 else str` is not a valid type. -annotations_typeexpr.py:96:8 Undefined or invalid type [11]: Annotation `var1` is not defined as a type. -annotations_typeexpr.py:97:9 Invalid type [31]: Expression `True` is not a valid type. -annotations_typeexpr.py:98:9 Invalid type [31]: Expression `1` is not a valid type. -annotations_typeexpr.py:99:9 Invalid type [31]: Expression `-1` is not a valid type. -annotations_typeexpr.py:100:9 Invalid type [31]: Expression `int or str` is not a valid type. -annotations_typeexpr.py:101:9 Invalid type [31]: Expression `"int"` is not a valid type. -annotations_typeexpr.py:102:9 Undefined or invalid type [11]: Annotation `types` is not defined as a type. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/callables_annotation.toml b/conformance/results/pyre/callables_annotation.toml deleted file mode 100644 index 2d155ba0..00000000 --- a/conformance/results/pyre/callables_annotation.toml +++ /dev/null @@ -1,53 +0,0 @@ -conformant = "Partial" -notes = """ -Does not evaluate correct type for `*args: int` parameter. -Does not correctly implement type compatibility rules for "...". -Does not treat "*args: Any, **kwargs: Any" as "...". -""" -output = """ -callables_annotation.py:25:4 Missing argument [20]: PositionalOnly call expects argument in position 1. -callables_annotation.py:26:10 Incompatible parameter type [6]: In anonymous call, for 2nd positional argument, expected `str` but got `int`. -callables_annotation.py:27:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -callables_annotation.py:29:4 Unexpected keyword [28]: Unexpected keyword argument `a` to anonymous call. -callables_annotation.py:35:4 Too many arguments [19]: PositionalOnly call expects 0 positional arguments, 1 was provided. -callables_annotation.py:55:4 Invalid type [31]: Expression `typing.Callable[int]` is not a valid type. -callables_annotation.py:56:4 Invalid type [31]: Expression `typing.Callable[(int, int)]` is not a valid type. -callables_annotation.py:57:4 Invalid type [31]: Expression `typing.Callable[([], [int])]` is not a valid type. -callables_annotation.py:58:4 Invalid type [31]: Expression `typing.Callable[(int, int, int)]` is not a valid type. -callables_annotation.py:59:4 Invalid type [31]: Expression `typing.Callable[([...], int)]` is not a valid type. -callables_annotation.py:89:5 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], str)]` is not a valid type. -callables_annotation.py:145:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type. -callables_annotation.py:151:9 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type. -callables_annotation.py:155:4 Incompatible variable type [9]: ok9 is declared to have type `Proto4[[...]]` but is used as type `Proto3`. -callables_annotation.py:156:4 Incompatible variable type [9]: ok10 is declared to have type `Proto3` but is used as type `Proto4[[...]]`. -callables_annotation.py:157:4 Incompatible variable type [9]: ok11 is declared to have type `Proto6` but is used as type `Proto7`. -callables_annotation.py:159:4 Incompatible variable type [9]: err1 is declared to have type `Proto5[typing.Any]` but is used as type `Proto8`. -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]]`. -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]]`. -callables_annotation.py:171:8 Undefined or invalid type [11]: Annotation `Callback1` is not defined as a type. -callables_annotation.py:172:8 Undefined or invalid type [11]: Annotation `Callback2` is not defined as a type. -callables_annotation.py:181:0 Incompatible variable type [9]: CallbackWithInt is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`. -callables_annotation.py:182:0 Incompatible variable type [9]: CallbackWithStr is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`. -callables_annotation.py:186:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], str)]` is not a valid type. -callables_annotation.py:187:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(str, ...)], str)]` is not a valid type. -callables_annotation.py:188:8 Undefined or invalid type [11]: Annotation `CallbackWithInt` is not defined as a type. -callables_annotation.py:189:8 Undefined or invalid type [11]: Annotation `CallbackWithStr` is not defined as a type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 91: Expected 1 errors -Line 93: Expected 1 errors -Line 89: Unexpected errors ['callables_annotation.py:89:5 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], str)]` is not a valid type.'] -Line 145: Unexpected errors ['callables_annotation.py:145:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type.'] -Line 151: Unexpected errors ['callables_annotation.py:151:9 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], None)]` is not a valid type.'] -Line 155: Unexpected errors ['callables_annotation.py:155:4 Incompatible variable type [9]: ok9 is declared to have type `Proto4[[...]]` but is used as type `Proto3`.'] -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[[...]]`.'] -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`.'] -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]]`.'] -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]]`.'] -Line 171: Unexpected errors ['callables_annotation.py:171:8 Undefined or invalid type [11]: Annotation `Callback1` is not defined as a type.'] -Line 181: Unexpected errors ['callables_annotation.py:181:0 Incompatible variable type [9]: CallbackWithInt is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`.'] -Line 182: Unexpected errors ['callables_annotation.py:182:0 Incompatible variable type [9]: CallbackWithStr is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., str]]`.'] -Line 186: Unexpected errors ['callables_annotation.py:186:8 Invalid type [31]: Expression `typing.Callable[(typing.Concatenate[(int, ...)], str)]` is not a valid type.'] -Line 188: Unexpected errors ['callables_annotation.py:188:8 Undefined or invalid type [11]: Annotation `CallbackWithInt` is not defined as a type.'] -""" diff --git a/conformance/results/pyre/callables_kwargs.toml b/conformance/results/pyre/callables_kwargs.toml deleted file mode 100644 index a325fe97..00000000 --- a/conformance/results/pyre/callables_kwargs.toml +++ /dev/null @@ -1,22 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -callables_kwargs.py:46:4 Missing argument [20]: Call `func1` expects argument `v3`. -callables_kwargs.py:51:4 Unexpected keyword [28]: Unexpected keyword argument `v4` to call `func1`. -callables_kwargs.py:52:4 Too many arguments [19]: Call `func1` expects 0 positional arguments, 3 were provided. -callables_kwargs.py:58:12 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `TD2` but got `Dict[str, str]`. -callables_kwargs.py:61:12 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `TD2` but got `Dict[str, Union[int, str]]`. -callables_kwargs.py:63:4 Unexpected keyword [28]: Unexpected keyword argument `v1` to call `func1`. -callables_kwargs.py:64:4 Unexpected keyword [28]: Unexpected keyword argument `v3` to call `func2`. -callables_kwargs.py:65:4 Unexpected keyword [28]: Unexpected keyword argument `v1` to call `func2`. -callables_kwargs.py:101:0 Incompatible variable type [9]: v3 is declared to have type `TDProtocol3` but is used as type `typing.Callable(func1)[[Keywords(Unpack[TD2])], None]`. -callables_kwargs.py:102:0 Incompatible variable type [9]: v4 is declared to have type `TDProtocol4` but is used as type `typing.Callable(func1)[[Keywords(Unpack[TD2])], None]`. -callables_kwargs.py:103:0 Incompatible variable type [9]: v5 is declared to have type `TDProtocol5` but is used as type `typing.Callable(func1)[[Keywords(Unpack[TD2])], None]`. -callables_kwargs.py:111:21 Duplicate parameter [65]: Duplicate parameter name `v1`. -callables_kwargs.py:122:12 Invalid type [31]: `Unpack` in kwargs may only be used with typed dictionaries. `Variable[T (bound to TD2)]` is not a typed dictionary. -callables_kwargs.py:134:0 Incompatible variable type [9]: v7 is declared to have type `TDProtocol6` but is used as type `typing.Callable(func7)[[KeywordOnly(v1, int), KeywordOnly(v3, str), KeywordOnly(v2, str, default)], None]`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/callables_protocol.toml b/conformance/results/pyre/callables_protocol.toml deleted file mode 100644 index a20e7472..00000000 --- a/conformance/results/pyre/callables_protocol.toml +++ /dev/null @@ -1,32 +0,0 @@ -conformant = "Partial" -notes = """ -Does not correctly handle callback protocol that declares attributes in all functions. -Does not report type incompatibility for callback protocol with positional-only parameters. -Incorrectly reports type compatibility error with callback that has *args and **kwargs. -Does not report type incompatibility for callback missing a default argument for positional parameter. -Does not report type incompatibility for callback missing a default argument for keyword parameter. -""" -output = """ -callables_protocol.py:35:0 Incompatible variable type [9]: cb1 is declared to have type `Proto1` but is used as type `typing.Callable(cb1_bad1)[[Variable(bytes), KeywordOnly(max_items, Optional[int])], List[bytes]]`. -callables_protocol.py:36:0 Incompatible variable type [9]: cb1 is declared to have type `Proto1` but is used as type `typing.Callable(cb1_bad2)[[Variable(bytes)], List[bytes]]`. -callables_protocol.py:37:0 Incompatible variable type [9]: cb1 is declared to have type `Proto1` but is used as type `typing.Callable(cb1_bad3)[[Variable(bytes), KeywordOnly(max_len, Optional[str])], List[bytes]]`. -callables_protocol.py:67:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad1)[[Variable(bytes)], typing.Any]`. -callables_protocol.py:68:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad2)[[Variable(str), Keywords(str)], typing.Any]`. -callables_protocol.py:69:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad3)[[Variable(bytes), Keywords(bytes)], typing.Any]`. -callables_protocol.py:70:0 Incompatible variable type [9]: cb2 is declared to have type `Proto2` but is used as type `typing.Callable(cb2_bad4)[[Keywords(str)], typing.Any]`. -callables_protocol.py:97:0 Incompatible variable type [9]: var4 is declared to have type `Proto4` but is used as type `typing.Callable(cb4_bad1)[[Named(x, int)], None]`. -callables_protocol.py:121:0 Incompatible variable type [9]: cb6 is declared to have type `NotProto6` but is used as type `typing.Callable(cb6_bad1)[[Variable(bytes), KeywordOnly(max_len, Optional[int], default)], List[bytes]]`. -callables_protocol.py:169:0 Incompatible variable type [9]: cb8 is declared to have type `Proto8` but is used as type `typing.Callable(cb8_bad1)[[Named(x, int)], typing.Any]`. -callables_protocol.py:186:4 Incompatible attribute type [8]: Attribute `other_attribute` declared in class `Proto9` has type `int` but is used as type `str`. -callables_protocol.py:187:4 Undefined attribute [16]: `Proto9` has no attribute `xxx`. -callables_protocol.py:197:6 Undefined attribute [16]: `Proto9` has no attribute `other_attribute2`. -callables_protocol.py:216:0 Incompatible variable type [9]: cb10 is declared to have type `Proto10` but is used as type `typing.Callable(cb10_good)[[], None]`. -callables_protocol.py:260:0 Incompatible variable type [9]: cb12 is declared to have type `Proto12` but is used as type `typing.Callable(cb12_bad1)[[Variable(typing.Any), KeywordOnly(kwarg0, typing.Any)], None]`. -callables_protocol.py:284:0 Incompatible variable type [9]: cb13_2 is declared to have type `Proto13_Default` but is used as type `typing.Callable(cb13_no_default)[[Named(path, str)], str]`. -callables_protocol.py:311:0 Incompatible variable type [9]: cb14_2 is declared to have type `Proto14_Default` but is used as type `typing.Callable(cb14_no_default)[[KeywordOnly(path, str)], str]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 238: Expected 1 errors -Line 216: Unexpected errors ['callables_protocol.py:216:0 Incompatible variable type [9]: cb10 is declared to have type `Proto10` but is used as type `typing.Callable(cb10_good)[[], None]`.'] -""" diff --git a/conformance/results/pyre/callables_subtyping.toml b/conformance/results/pyre/callables_subtyping.toml deleted file mode 100644 index 64b9b65f..00000000 --- a/conformance/results/pyre/callables_subtyping.toml +++ /dev/null @@ -1,53 +0,0 @@ -conformant = "Partial" -notes = """ -Rejects standard parameter as incompatible with keyword-only parameter. -Rejects use of Callable with ParamSpec in TypeAlias definition. -""" -errors_diff = """ -Line 196: Expected 1 errors -Line 57: Unexpected errors ['callables_subtyping.py:57:4 Incompatible variable type [9]: f5 is declared to have type `KwOnly2` but is used as type `Standard2`.'] -Line 208: Unexpected errors ['callables_subtyping.py:208:0 Incompatible variable type [9]: TypeAliasWithP is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'callables_subtyping.py:208:37 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]`.'] -Line 211: Unexpected errors ['callables_subtyping.py:211:39 Undefined or invalid type [11]: Annotation `TypeAliasWithP` is not defined as a type.'] -Line 253: Unexpected errors ['callables_subtyping.py:253:4 Missing overload implementation [42]: Overloaded function `Overloaded9.__call__` must have an implementation.'] -Line 282: Unexpected errors ['callables_subtyping.py:282:4 Missing overload implementation [42]: Overloaded function `Overloaded10.__call__` must have an implementation.'] -""" -output = """ -callables_subtyping.py:26:4 Incompatible variable type [9]: f6 is declared to have type `typing.Callable[[float], float]` but is used as type `typing.Callable[[int], int]`. -callables_subtyping.py:29:4 Incompatible variable type [9]: f8 is declared to have type `typing.Callable[[int], int]` but is used as type `typing.Callable[[float], float]`. -callables_subtyping.py:51:4 Incompatible variable type [9]: f1 is declared to have type `Standard2` but is used as type `PosOnly2`. -callables_subtyping.py:52:4 Incompatible variable type [9]: f2 is declared to have type `Standard2` but is used as type `KwOnly2`. -callables_subtyping.py:55:4 Incompatible variable type [9]: f4 is declared to have type `PosOnly2` but is used as type `KwOnly2`. -callables_subtyping.py:57:4 Incompatible variable type [9]: f5 is declared to have type `KwOnly2` but is used as type `Standard2`. -callables_subtyping.py:58:4 Incompatible variable type [9]: f6 is declared to have type `KwOnly2` but is used as type `PosOnly2`. -callables_subtyping.py:82:4 Incompatible variable type [9]: f3 is declared to have type `IntArgs3` but is used as type `NoArgs3`. -callables_subtyping.py:85:4 Incompatible variable type [9]: f5 is declared to have type `FloatArgs3` but is used as type `NoArgs3`. -callables_subtyping.py:86:4 Incompatible variable type [9]: f6 is declared to have type `FloatArgs3` but is used as type `IntArgs3`. -callables_subtyping.py:116:4 Incompatible variable type [9]: f1 is declared to have type `PosOnly4` but is used as type `IntArgs4`. -callables_subtyping.py:119:4 Incompatible variable type [9]: f4 is declared to have type `IntStrArgs4` but is used as type `StrArgs4`. -callables_subtyping.py:120:4 Incompatible variable type [9]: f5 is declared to have type `IntStrArgs4` but is used as type `IntArgs4`. -callables_subtyping.py:122:4 Incompatible variable type [9]: f7 is declared to have type `StrArgs4` but is used as type `IntArgs4`. -callables_subtyping.py:124:4 Incompatible variable type [9]: f9 is declared to have type `IntArgs4` but is used as type `StrArgs4`. -callables_subtyping.py:125:4 Incompatible variable type [9]: f10 is declared to have type `Standard4` but is used as type `IntStrArgs4`. -callables_subtyping.py:126:4 Incompatible variable type [9]: f11 is declared to have type `Standard4` but is used as type `StrArgs4`. -callables_subtyping.py:151:4 Incompatible variable type [9]: f3 is declared to have type `IntKwargs5` but is used as type `NoKwargs5`. -callables_subtyping.py:154:4 Incompatible variable type [9]: f5 is declared to have type `FloatKwargs5` but is used as type `NoKwargs5`. -callables_subtyping.py:155:4 Incompatible variable type [9]: f6 is declared to have type `FloatKwargs5` but is used as type `IntKwargs5`. -callables_subtyping.py:187:4 Incompatible variable type [9]: f1 is declared to have type `KwOnly6` but is used as type `IntKwargs6`. -callables_subtyping.py:190:4 Incompatible variable type [9]: f4 is declared to have type `IntStrKwargs6` but is used as type `StrKwargs6`. -callables_subtyping.py:191:4 Incompatible variable type [9]: f5 is declared to have type `IntStrKwargs6` but is used as type `IntKwargs6`. -callables_subtyping.py:193:4 Incompatible variable type [9]: f7 is declared to have type `StrKwargs6` but is used as type `IntKwargs6`. -callables_subtyping.py:195:4 Incompatible variable type [9]: f9 is declared to have type `IntKwargs6` but is used as type `StrKwargs6`. -callables_subtyping.py:197:4 Incompatible variable type [9]: f11 is declared to have type `Standard6` but is used as type `StrKwargs6`. -callables_subtyping.py:208:0 Incompatible variable type [9]: TypeAliasWithP is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`. -callables_subtyping.py:208:37 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]`. -callables_subtyping.py:211:39 Undefined or invalid type [11]: Annotation `TypeAliasWithP` is not defined as a type. -callables_subtyping.py:236:4 Incompatible variable type [9]: f1 is declared to have type `DefaultArg8` but is used as type `NoDefaultArg8`. -callables_subtyping.py:237:4 Incompatible variable type [9]: f2 is declared to have type `DefaultArg8` but is used as type `NoX8`. -callables_subtyping.py:240:4 Incompatible variable type [9]: f4 is declared to have type `NoDefaultArg8` but is used as type `NoX8`. -callables_subtyping.py:243:4 Incompatible variable type [9]: f6 is declared to have type `NoX8` but is used as type `NoDefaultArg8`. -callables_subtyping.py:253:4 Missing overload implementation [42]: Overloaded function `Overloaded9.__call__` must have an implementation. -callables_subtyping.py:273:4 Incompatible variable type [9]: f3 is declared to have type `FloatArg9` but is used as type `Overloaded9`. -callables_subtyping.py:282:4 Missing overload implementation [42]: Overloaded function `Overloaded10.__call__` must have an implementation. -callables_subtyping.py:297:4 Incompatible variable type [9]: f2 is declared to have type `Overloaded10` but is used as type `StrArg10`. -""" -conformance_automated = "Fail" diff --git a/conformance/results/pyre/classes_classvar.toml b/conformance/results/pyre/classes_classvar.toml deleted file mode 100644 index 1f3bb297..00000000 --- a/conformance/results/pyre/classes_classvar.toml +++ /dev/null @@ -1,37 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of TypeVar in ClassVar. -Does not reject use of ParamSpec in ClassVar. -Does not reject use of ClassVar as a generic type argument. -Does not reject use of ClassVar in parameter type annotation. -Does not reject use of ClassVar in local variable annotation. -Does not reject use of ClassVar in instance variable annotation. -Does not reject use of ClassVar in return type annotation. -Does not reject use of ClassVar in type alias definition. -Does not infer type from initialization for bare ClassVar. -""" -output = """ -classes_classvar.py:38:10 Invalid type parameters [24]: Generic type `CV` expects 1 type parameter, received 2. -classes_classvar.py:39:10 Invalid type [31]: Expression `typing.ClassVar[3]` is not a valid type. -classes_classvar.py:40:13 Unbound name [10]: Name `var` is used but not defined in the current scope. -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]]`. -classes_classvar.py:66:4 Uninitialized attribute [13]: Attribute `good5` is declared in class `ClassA` to have type `typing.Any` but is never initialized. -classes_classvar.py:71:8 Undefined attribute [16]: `ClassA` has no attribute `xx`. -classes_classvar.py:74:8 Incompatible return type [7]: Expected `CV[int]` but got `int`. -classes_classvar.py:111:0 Invalid assignment [41]: Assigning to class variable through instance, did you mean to assign to `Starship.stats` instead? -classes_classvar.py:140:0 Incompatible variable type [9]: a is declared to have type `ProtoA` but is used as type `ProtoAImpl`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 47: Expected 1 errors -Line 54: Expected 1 errors -Line 55: Expected 1 errors -Line 69: Expected 1 errors -Line 70: Expected 1 errors -Line 73: Expected 1 errors -Line 77: Expected 1 errors -Line 78: Expected 1 errors -Line 74: Unexpected errors ['classes_classvar.py:74:8 Incompatible return type [7]: Expected `CV[int]` but got `int`.'] -""" diff --git a/conformance/results/pyre/classes_override.toml b/conformance/results/pyre/classes_override.toml deleted file mode 100644 index bb459508..00000000 --- a/conformance/results/pyre/classes_override.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -classes_override.py:53:4 Invalid override [40]: `classes_override.ChildA.method3` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`. -classes_override.py:65:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -classes_override.py:65:4 Invalid override [40]: `classes_override.ChildA.method4` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`. -classes_override.py:79:4 Invalid override [40]: `classes_override.ChildA.static_method1` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`. -classes_override.py:84:4 Invalid override [40]: `classes_override.ChildA.class_method1` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`. -classes_override.py:89:4 Invalid override [40]: `classes_override.ChildA.property1` is decorated with @override, but no method of the same name exists in superclasses of `ChildA`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/constructors_call_init.toml b/conformance/results/pyre/constructors_call_init.toml deleted file mode 100644 index 0db6964f..00000000 --- a/conformance/results/pyre/constructors_call_init.toml +++ /dev/null @@ -1,28 +0,0 @@ -conformant = "Partial" -notes = """ -Does not infer type of Self for self parameter of __init__ method. -Does not report errors during binding to self parameter of __init__ method. -Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method. -Incorrectly raises Incompatible overload type errors. -Incorrectly raises compatibility type errors. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 42: Expected 1 errors -Line 56: Expected 1 errors -Line 107: Expected 1 errors -Line 24: Unexpected errors ['constructors_call_init.py:24:0 Assert type [70]: Expected `Class1[int]` but got `Class1[typing_extensions.Literal[1]]`.'] -Line 61: Unexpected errors ['constructors_call_init.py:61:4 Incompatible overload [43]: The implementation of `Class5.__init__` does not accept all possible arguments of overload defined on line `61`.'] -Line 63: Unexpected errors ['constructors_call_init.py:63:4 Incompatible overload [43]: The implementation of `Class5.__init__` does not accept all possible arguments of overload defined on line `63`.'] -Line 91: Unexpected errors ["constructors_call_init.py:91:0 Assert type [70]: Expected `Class6[int, str]` but got `Class6[typing_extensions.Literal[0], typing_extensions.Literal['']]`."] -Line 99: Unexpected errors ["constructors_call_init.py:99:0 Assert type [70]: Expected `Class7[str, int]` but got `Class7[typing_extensions.Literal[''], typing_extensions.Literal[0]]`."] -""" -output = """ -constructors_call_init.py:21:12 Incompatible parameter type [6]: In call `Class1.__init__`, for 1st positional argument, expected `int` but got `float`. -constructors_call_init.py:24:0 Assert type [70]: Expected `Class1[int]` but got `Class1[typing_extensions.Literal[1]]`. -constructors_call_init.py:61:4 Incompatible overload [43]: The implementation of `Class5.__init__` does not accept all possible arguments of overload defined on line `61`. -constructors_call_init.py:63:4 Incompatible overload [43]: The implementation of `Class5.__init__` does not accept all possible arguments of overload defined on line `63`. -constructors_call_init.py:91:0 Assert type [70]: Expected `Class6[int, str]` but got `Class6[typing_extensions.Literal[0], typing_extensions.Literal['']]`. -constructors_call_init.py:99:0 Assert type [70]: Expected `Class7[str, int]` but got `Class7[typing_extensions.Literal[''], typing_extensions.Literal[0]]`. -constructors_call_init.py:130:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. -""" diff --git a/conformance/results/pyre/constructors_call_metaclass.toml b/conformance/results/pyre/constructors_call_metaclass.toml deleted file mode 100644 index 2eb021bb..00000000 --- a/conformance/results/pyre/constructors_call_metaclass.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Partial" -notes = """ -Does not evaluate __new__ if metaclass __call__ is defined. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 54: Expected 1 errors -Line 68: Expected 1 errors -Line 69: Unexpected errors ['constructors_call_metaclass.py:69:0 Assert type [70]: Expected `Class4` but got `typing.Any`.'] -""" -output = """ -constructors_call_metaclass.py:69:0 Assert type [70]: Expected `Class4` but got `typing.Any`. -""" diff --git a/conformance/results/pyre/constructors_call_new.toml b/conformance/results/pyre/constructors_call_new.toml deleted file mode 100644 index f0be5794..00000000 --- a/conformance/results/pyre/constructors_call_new.toml +++ /dev/null @@ -1,31 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support __new__ return type that is not a subclass of the class being constructed. -Does not report errors during binding to cls parameter of __new__ method. -Incorrectly raises compatibility type errors. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 145: Expected 1 errors -Line 23: Unexpected errors ['constructors_call_new.py:23:0 Assert type [70]: Expected `Class1[int]` but got `Class1[typing_extensions.Literal[1]]`.'] -Line 35: Unexpected errors ['constructors_call_new.py:35:0 Assert type [70]: Expected `Class2[int]` but got `Class2[typing_extensions.Literal[1]]`.'] -Line 36: Unexpected errors ["constructors_call_new.py:36:0 Assert type [70]: Expected `Class2[str]` but got `Class2[typing_extensions.Literal['']]`."] -Line 49: Unexpected errors ['constructors_call_new.py:49:0 Assert type [70]: Expected `int` but got `Class3`.', 'constructors_call_new.py:49:12 Missing argument [20]: Call `Class3.__init__` expects argument `x`.'] -Line 64: Unexpected errors ['constructors_call_new.py:64:0 Assert type [70]: Expected `typing.Any` but got `Class4`.', 'constructors_call_new.py:64:12 Missing argument [20]: Call `Class4.__init__` expects argument `x`.'] -Line 76: Unexpected errors ['constructors_call_new.py:76:4 Assert type [70]: Expected `NoReturn` but got `Class5`.', 'constructors_call_new.py:76:16 Missing argument [20]: Call `Class5.__init__` expects argument `x`.'] -Line 89: Unexpected errors ['constructors_call_new.py:89:0 Assert type [70]: Expected `Union[Class6, int]` but got `Class6`.', 'constructors_call_new.py:89:12 Missing argument [20]: Call `Class6.__init__` expects argument `x`.'] -""" -output = """ -constructors_call_new.py:21:12 Incompatible parameter type [6]: In call `Class1.__new__`, for 1st positional argument, expected `int` but got `float`. -constructors_call_new.py:23:0 Assert type [70]: Expected `Class1[int]` but got `Class1[typing_extensions.Literal[1]]`. -constructors_call_new.py:35:0 Assert type [70]: Expected `Class2[int]` but got `Class2[typing_extensions.Literal[1]]`. -constructors_call_new.py:36:0 Assert type [70]: Expected `Class2[str]` but got `Class2[typing_extensions.Literal['']]`. -constructors_call_new.py:49:0 Assert type [70]: Expected `int` but got `Class3`. -constructors_call_new.py:49:12 Missing argument [20]: Call `Class3.__init__` expects argument `x`. -constructors_call_new.py:64:0 Assert type [70]: Expected `typing.Any` but got `Class4`. -constructors_call_new.py:64:12 Missing argument [20]: Call `Class4.__init__` expects argument `x`. -constructors_call_new.py:76:4 Assert type [70]: Expected `NoReturn` but got `Class5`. -constructors_call_new.py:76:16 Missing argument [20]: Call `Class5.__init__` expects argument `x`. -constructors_call_new.py:89:0 Assert type [70]: Expected `Union[Class6, int]` but got `Class6`. -constructors_call_new.py:89:12 Missing argument [20]: Call `Class6.__init__` expects argument `x`. -""" diff --git a/conformance/results/pyre/constructors_call_type.toml b/conformance/results/pyre/constructors_call_type.toml deleted file mode 100644 index b78a1daf..00000000 --- a/conformance/results/pyre/constructors_call_type.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -errors_diff = """ -""" -output = """ -constructors_call_type.py:30:4 Missing argument [20]: Call `Meta1.__call__` expects argument `x`. -constructors_call_type.py:40:4 Missing argument [20]: Call `Class2.__new__` expects argument `x`. -constructors_call_type.py:50:4 Missing argument [20]: Call `Class3.__init__` expects argument `x`. -constructors_call_type.py:59:4 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. -constructors_call_type.py:64:4 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. -constructors_call_type.py:72:4 Missing argument [20]: Call `Meta1.__call__` expects argument `x`. -constructors_call_type.py:81:4 Missing argument [20]: Call `Class2.__new__` expects argument `y`. -constructors_call_type.py:82:11 Incompatible parameter type [6]: In call `Class2.__new__`, for 2nd positional argument, expected `str` but got `int`. -""" -conformance_automated = "Pass" diff --git a/conformance/results/pyre/constructors_callable.toml b/conformance/results/pyre/constructors_callable.toml deleted file mode 100644 index 0f3650ea..00000000 --- a/conformance/results/pyre/constructors_callable.toml +++ /dev/null @@ -1,60 +0,0 @@ -conformant = "Partial" -notes = """ -Does not generate a union type for __new__ and __init__ when converting class to callable. -Does not ignore __init__ based on __new__ return type when converting class to callable. -Does not support __new__ return type that is different from class being constructed. -Does not use annotated type of self in __init__ method to generate return type of callable. -Incorrectly raises incompatibility type errors. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 127: Expected 1 errors -Line 144: Expected 1 errors -Line 184: Expected 1 errors -Line 195: Expected 1 errors -Line 78: Unexpected errors ['constructors_callable.py:78:0 Assert type [70]: Expected `int` but got `Class4`.'] -Line 126: Unexpected errors ['constructors_callable.py:126:0 Assert type [70]: Expected `Class6Proxy` but got `Class6`.', 'constructors_callable.py:126:12 Missing argument [20]: PositionalOnly call expects argument `x`.'] -Line 143: Unexpected errors ['constructors_callable.py:143:0 Assert type [70]: Expected `typing.Any` but got `Class6Any`.', 'constructors_callable.py:143:12 Missing argument [20]: PositionalOnly call expects argument `x`.'] -Line 153: Unexpected errors ['constructors_callable.py:153:4 Incompatible overload [43]: The implementation of `Class7.__init__` does not accept all possible arguments of overload defined on line `153`.'] -Line 155: Unexpected errors ['constructors_callable.py:155:4 Incompatible overload [43]: The implementation of `Class7.__init__` does not accept all possible arguments of overload defined on line `155`.'] -Line 164: Unexpected errors ['constructors_callable.py:164:0 Assert type [70]: Expected `Class7[int]` but got `Class7[typing.Any]`.'] -Line 165: Unexpected errors ['constructors_callable.py:165:0 Assert type [70]: Expected `Class7[str]` but got `Class7[typing.Any]`.', 'constructors_callable.py:165:15 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `int` but got `str`.'] -Line 181: Unexpected errors ['constructors_callable.py:181:22 Incompatible parameter type [6]: In call `accepts_callable`, for 1st positional argument, expected `typing.Callable[constructors_callable.P, Variable[R]]` but got `Type[Class8]`.'] -Line 183: Unexpected errors ['constructors_callable.py:183:0 Assert type [70]: Expected `Class8[str]` but got `typing.Any`.'] -Line 192: Unexpected errors ['constructors_callable.py:192:22 Incompatible parameter type [6]: In call `accepts_callable`, for 1st positional argument, expected `typing.Callable[constructors_callable.P, Variable[R]]` but got `Type[Class9]`.'] -Line 194: Unexpected errors ['constructors_callable.py:194:0 Assert type [70]: Expected `Class9` but got `typing.Any`.'] -""" -output = """ -constructors_callable.py:36:0 Revealed type [-1]: Revealed type for `r1` is `typing.Callable[[Named(x, int)], Class1]`. -constructors_callable.py:38:0 Missing argument [20]: PositionalOnly call expects argument `x`. -constructors_callable.py:39:0 Unexpected keyword [28]: Unexpected keyword argument `y` to anonymous call. -constructors_callable.py:49:0 Revealed type [-1]: Revealed type for `r2` is `typing.Callable[[], Class2]`. -constructors_callable.py:51:0 Too many arguments [19]: PositionalOnly call expects 0 positional arguments, 1 was provided. -constructors_callable.py:63:0 Revealed type [-1]: Revealed type for `r3` is `typing.Callable[[Named(x, int)], Class3]`. -constructors_callable.py:65:0 Missing argument [20]: PositionalOnly call expects argument `x`. -constructors_callable.py:66:0 Unexpected keyword [28]: Unexpected keyword argument `y` to anonymous call. -constructors_callable.py:67:0 Too many arguments [19]: PositionalOnly call expects 1 positional argument, 2 were provided. -constructors_callable.py:77:0 Revealed type [-1]: Revealed type for `r4` is `typing.Callable[[Named(x, int)], Class4]`. -constructors_callable.py:78:0 Assert type [70]: Expected `int` but got `Class4`. -constructors_callable.py:79:0 Missing argument [20]: PositionalOnly call expects argument `x`. -constructors_callable.py:80:0 Unexpected keyword [28]: Unexpected keyword argument `y` to anonymous call. -constructors_callable.py:97:0 Revealed type [-1]: Revealed type for `r5` is `typing.Callable[[Variable(typing.Any), Keywords(typing.Any)], NoReturn]`. -constructors_callable.py:125:0 Revealed type [-1]: Revealed type for `r6` is `typing.Callable[[Named(x, int)], Class6]`. -constructors_callable.py:126:0 Assert type [70]: Expected `Class6Proxy` but got `Class6`. -constructors_callable.py:126:12 Missing argument [20]: PositionalOnly call expects argument `x`. -constructors_callable.py:142:0 Revealed type [-1]: Revealed type for `r6_any` is `typing.Callable[[Named(x, int)], Class6Any]`. -constructors_callable.py:143:0 Assert type [70]: Expected `typing.Any` but got `Class6Any`. -constructors_callable.py:143:12 Missing argument [20]: PositionalOnly call expects argument `x`. -constructors_callable.py:153:4 Incompatible overload [43]: The implementation of `Class7.__init__` does not accept all possible arguments of overload defined on line `153`. -constructors_callable.py:155:4 Incompatible overload [43]: The implementation of `Class7.__init__` does not accept all possible arguments of overload defined on line `155`. -constructors_callable.py:161:0 Revealed type [-1]: Revealed type for `r7` is `typing.Callable[[Named(x, int)], Class7[typing.Any]]`. -constructors_callable.py:164:0 Assert type [70]: Expected `Class7[int]` but got `Class7[typing.Any]`. -constructors_callable.py:165:0 Assert type [70]: Expected `Class7[str]` but got `Class7[typing.Any]`. -constructors_callable.py:165:15 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `int` but got `str`. -constructors_callable.py:181:22 Incompatible parameter type [6]: In call `accepts_callable`, for 1st positional argument, expected `typing.Callable[constructors_callable.P, Variable[R]]` but got `Type[Class8]`. -constructors_callable.py:182:0 Revealed type [-1]: Revealed type for `r8` is `typing.Callable[..., typing.Any]`. -constructors_callable.py:183:0 Assert type [70]: Expected `Class8[str]` but got `typing.Any`. -constructors_callable.py:192:22 Incompatible parameter type [6]: In call `accepts_callable`, for 1st positional argument, expected `typing.Callable[constructors_callable.P, Variable[R]]` but got `Type[Class9]`. -constructors_callable.py:193:0 Revealed type [-1]: Revealed type for `r9` is `typing.Callable[..., typing.Any]`. -constructors_callable.py:194:0 Assert type [70]: Expected `Class9` but got `typing.Any`. -""" diff --git a/conformance/results/pyre/constructors_consistency.toml b/conformance/results/pyre/constructors_consistency.toml deleted file mode 100644 index 654ebaa9..00000000 --- a/conformance/results/pyre/constructors_consistency.toml +++ /dev/null @@ -1,9 +0,0 @@ -conformant = "Pass" -notes = """ -Does not report inconsistency between __new__ and __init__ (optional). -""" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -""" diff --git a/conformance/results/pyre/dataclasses_descriptors.toml b/conformance/results/pyre/dataclasses_descriptors.toml deleted file mode 100644 index 05c108e4..00000000 --- a/conformance/results/pyre/dataclasses_descriptors.toml +++ /dev/null @@ -1,20 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly generates error when calling constructor of dataclass with descriptor. -Incorrectly raises incompatibility type errors. -""" -output = """ -dataclasses_descriptors.py:35:10 Incompatible parameter type [6]: In call `DC1.__init__`, for 1st positional argument, expected `Desc1` but got `int`. -dataclasses_descriptors.py:61:0 Assert type [70]: Expected `List[int]` but got `Desc2[int]`. -dataclasses_descriptors.py:62:0 Assert type [70]: Expected `List[str]` but got `Desc2[str]`. -dataclasses_descriptors.py:66:0 Assert type [70]: Expected `int` but got `Desc2[int]`. -dataclasses_descriptors.py:67:0 Assert type [70]: Expected `str` but got `Desc2[str]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 35: Unexpected errors ['dataclasses_descriptors.py:35:10 Incompatible parameter type [6]: In call `DC1.__init__`, for 1st positional argument, expected `Desc1` but got `int`.'] -Line 61: Unexpected errors ['dataclasses_descriptors.py:61:0 Assert type [70]: Expected `List[int]` but got `Desc2[int]`.'] -Line 62: Unexpected errors ['dataclasses_descriptors.py:62:0 Assert type [70]: Expected `List[str]` but got `Desc2[str]`.'] -Line 66: Unexpected errors ['dataclasses_descriptors.py:66:0 Assert type [70]: Expected `int` but got `Desc2[int]`.'] -Line 67: Unexpected errors ['dataclasses_descriptors.py:67:0 Assert type [70]: Expected `str` but got `Desc2[str]`.'] -""" diff --git a/conformance/results/pyre/dataclasses_final.toml b/conformance/results/pyre/dataclasses_final.toml deleted file mode 100644 index c579f132..00000000 --- a/conformance/results/pyre/dataclasses_final.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Pass" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -dataclasses_final.py:27:0 Invalid assignment [41]: Cannot reassign final attribute `D.final_classvar`. -dataclasses_final.py:35:0 Invalid assignment [41]: Cannot reassign final attribute `d.final_no_default`. -dataclasses_final.py:36:0 Invalid assignment [41]: Cannot reassign final attribute `d.final_with_default`. -dataclasses_final.py:37:0 Invalid assignment [41]: Cannot reassign final attribute `D.final_no_default`. -dataclasses_final.py:38:0 Invalid assignment [41]: Cannot reassign final attribute `D.final_with_default`. -""" diff --git a/conformance/results/pyre/dataclasses_frozen.toml b/conformance/results/pyre/dataclasses_frozen.toml deleted file mode 100644 index 410c163f..00000000 --- a/conformance/results/pyre/dataclasses_frozen.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -output = """ -dataclasses_frozen.py:16:0 Invalid assignment [41]: Cannot reassign final attribute `dc1.a`. -dataclasses_frozen.py:17:0 Invalid assignment [41]: Cannot reassign final attribute `dc1.b`. -dataclasses_frozen.py:23:0 Invalid inheritance [39]: Non-frozen dataclass `DC2` cannot inherit from frozen dataclass `DC1`. -dataclasses_frozen.py:33:0 Invalid inheritance [39]: Frozen dataclass `DC4` cannot inherit from non-frozen dataclass `DC3`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/dataclasses_hash.toml b/conformance/results/pyre/dataclasses_hash.toml deleted file mode 100644 index 7af6dcbd..00000000 --- a/conformance/results/pyre/dataclasses_hash.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report when dataclass is not compatible with Hashable protocol. -""" -output = """ -""" -conformance_automated = "Fail" -errors_diff = """ -Line 15: Expected 1 errors -Line 32: Expected 1 errors -""" diff --git a/conformance/results/pyre/dataclasses_inheritance.toml b/conformance/results/pyre/dataclasses_inheritance.toml deleted file mode 100644 index 1afca358..00000000 --- a/conformance/results/pyre/dataclasses_inheritance.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject ClassVar that is overridden by instance variable. -Does not reject instance variable that is overridden by ClassVar. -""" -output = """ -""" -conformance_automated = "Fail" -errors_diff = """ -Line 62: Expected 1 errors -Line 66: Expected 1 errors -""" diff --git a/conformance/results/pyre/dataclasses_kwonly.toml b/conformance/results/pyre/dataclasses_kwonly.toml deleted file mode 100644 index 9e66c08f..00000000 --- a/conformance/results/pyre/dataclasses_kwonly.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Partial" -notes = """ -Rejects legitimate use of dataclass field with `kw_only=True`. -""" -output = """ -dataclasses_kwonly.py:23:0 Too many arguments [19]: Call `DC1.__init__` expects 1 positional argument, 2 were provided. -dataclasses_kwonly.py:38:0 Too many arguments [19]: Call `DC2.__init__` expects 1 positional argument, 2 were provided. -dataclasses_kwonly.py:53:0 Too many arguments [19]: Call `DC3.__init__` expects 1 positional argument, 2 were provided. -dataclasses_kwonly.py:61:0 Unexpected keyword [28]: Unexpected keyword argument `b` to call `DC4.__init__`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 61: Unexpected errors ['dataclasses_kwonly.py:61:0 Unexpected keyword [28]: Unexpected keyword argument `b` to call `DC4.__init__`.'] -""" diff --git a/conformance/results/pyre/dataclasses_match_args.toml b/conformance/results/pyre/dataclasses_match_args.toml deleted file mode 100644 index d7bd7961..00000000 --- a/conformance/results/pyre/dataclasses_match_args.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Partial" -notes = """ -Adds kw-only fields to __match_args__. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 18: Unexpected errors ["dataclasses_match_args.py:18:0 Assert type [70]: Expected `Tuple[typing_extensions.Literal['x']]` but got `Tuple[typing_extensions.Literal['x'], typing_extensions.Literal['*'], typing_extensions.Literal['y']]`."] -""" -output = """ -dataclasses_match_args.py:18:0 Assert type [70]: Expected `Tuple[typing_extensions.Literal['x']]` but got `Tuple[typing_extensions.Literal['x'], typing_extensions.Literal['*'], typing_extensions.Literal['y']]`. -dataclasses_match_args.py:42:0 Undefined attribute [16]: `DC4` has no attribute `__match_args__`. -""" diff --git a/conformance/results/pyre/dataclasses_order.toml b/conformance/results/pyre/dataclasses_order.toml deleted file mode 100644 index 0452db28..00000000 --- a/conformance/results/pyre/dataclasses_order.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ -dataclasses_order.py:50:3 Unsupported operand [58]: `<` is not supported for operand types `DC1` and `DC2`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/dataclasses_postinit.toml b/conformance/results/pyre/dataclasses_postinit.toml deleted file mode 100644 index 31199486..00000000 --- a/conformance/results/pyre/dataclasses_postinit.toml +++ /dev/null @@ -1,28 +0,0 @@ -conformant = "Partial" -notes = """ -Does not perform validation of `__post_init__` method. -Incorrectly complains on the assignment of `InitVar` in class bodies. -""" -output = """ -dataclasses_postinit.py:15:4 Undefined attribute [16]: `typing.Type` has no attribute `x`. -dataclasses_postinit.py:17:4 Undefined attribute [16]: `typing.Type` has no attribute `y`. -dataclasses_postinit.py:28:6 Undefined attribute [16]: `DC1` has no attribute `x`. -dataclasses_postinit.py:29:6 Undefined attribute [16]: `DC1` has no attribute `y`. -dataclasses_postinit.py:33:4 Undefined attribute [16]: `typing.Type` has no attribute `x`. -dataclasses_postinit.py:34:4 Undefined attribute [16]: `typing.Type` has no attribute `y`. -dataclasses_postinit.py:42:4 Undefined attribute [16]: `typing.Type` has no attribute `_name`. -dataclasses_postinit.py:51:4 Undefined attribute [16]: `typing.Type` has no attribute `_age`. -dataclasses_postinit.py:54:4 Inconsistent override [14]: `dataclasses_postinit.DC4.__post_init__` overrides method defined in `DC3` inconsistently. Could not find parameter `_age` in overridden signature. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 19: Expected 1 errors -Line 36: Expected 1 errors -Line 15: Unexpected errors ['dataclasses_postinit.py:15:4 Undefined attribute [16]: `typing.Type` has no attribute `x`.'] -Line 17: Unexpected errors ['dataclasses_postinit.py:17:4 Undefined attribute [16]: `typing.Type` has no attribute `y`.'] -Line 33: Unexpected errors ['dataclasses_postinit.py:33:4 Undefined attribute [16]: `typing.Type` has no attribute `x`.'] -Line 34: Unexpected errors ['dataclasses_postinit.py:34:4 Undefined attribute [16]: `typing.Type` has no attribute `y`.'] -Line 42: Unexpected errors ['dataclasses_postinit.py:42:4 Undefined attribute [16]: `typing.Type` has no attribute `_name`.'] -Line 51: Unexpected errors ['dataclasses_postinit.py:51:4 Undefined attribute [16]: `typing.Type` has no attribute `_age`.'] -Line 54: Unexpected errors ['dataclasses_postinit.py:54:4 Inconsistent override [14]: `dataclasses_postinit.DC4.__post_init__` overrides method defined in `DC3` inconsistently. Could not find parameter `_age` in overridden signature.'] -""" diff --git a/conformance/results/pyre/dataclasses_slots.toml b/conformance/results/pyre/dataclasses_slots.toml deleted file mode 100644 index ca83a885..00000000 --- a/conformance/results/pyre/dataclasses_slots.toml +++ /dev/null @@ -1,16 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report error when `slots=True` is used with `__slots__` definition. -Does not reject write to instance variable that is not defined in __slots__. -Does not reject access to `__slots__` from dataclass instance when `slots=False`. -""" -output = """ -dataclasses_slots.py:66:0 Undefined attribute [16]: `DC6` has no attribute `__slots__`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 25: Expected 1 errors -Line 38: Expected 1 errors -Line 69: Expected 1 errors -Lines 10, 11: Expected error (tag 'DC1') -""" diff --git a/conformance/results/pyre/dataclasses_transform_class.toml b/conformance/results/pyre/dataclasses_transform_class.toml deleted file mode 100644 index bdb113d3..00000000 --- a/conformance/results/pyre/dataclasses_transform_class.toml +++ /dev/null @@ -1,22 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support field specifiers. -Emits "attribute not initialized" error for dataclass field. -""" -output = """ -dataclasses_transform_class.py:51:0 Invalid inheritance [39]: Non-frozen dataclass `Customer1Subclass` cannot inherit from frozen dataclass `Customer1`. -dataclasses_transform_class.py:60:7 Unexpected keyword [28]: Unexpected keyword argument `other_name` to call `Customer1.__init__`. -dataclasses_transform_class.py:63:0 Invalid assignment [41]: Cannot reassign final attribute `c1_1.id`. -dataclasses_transform_class.py:66:7 Too many arguments [19]: Call `Customer1.__init__` expects 0 positional arguments, 2 were provided. -dataclasses_transform_class.py:72:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`. -dataclasses_transform_class.py:82:7 Too many arguments [19]: Call `Customer2.__init__` expects 0 positional arguments, 2 were provided. -dataclasses_transform_class.py:90:4 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `GenericModelBase` to have type `Variable[T]` but is never initialized. -dataclasses_transform_class.py:111:4 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelBaseFrozen` to have type `str` but is never initialized. -dataclasses_transform_class.py:122:0 Invalid assignment [41]: Cannot reassign final attribute `c3_1.id`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 60: Unexpected errors ['dataclasses_transform_class.py:60:7 Unexpected keyword [28]: Unexpected keyword argument `other_name` to call `Customer1.__init__`.'] -Line 90: Unexpected errors ['dataclasses_transform_class.py:90:4 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `GenericModelBase` to have type `Variable[T]` but is never initialized.'] -Line 111: Unexpected errors ['dataclasses_transform_class.py:111:4 Uninitialized attribute [13]: Attribute `not_a_field` is declared in class `ModelBaseFrozen` to have type `str` but is never initialized.'] -""" diff --git a/conformance/results/pyre/dataclasses_transform_converter.toml b/conformance/results/pyre/dataclasses_transform_converter.toml deleted file mode 100644 index 810debae..00000000 --- a/conformance/results/pyre/dataclasses_transform_converter.toml +++ /dev/null @@ -1,48 +0,0 @@ -conformant = "Unsupported" -notes = """ -Converter parameter not yet supported. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 118: Expected 1 errors -Line 112: Unexpected errors ['dataclasses_transform_converter.py:112:10 Incompatible parameter type [6]: In call `DC2.__init__`, for 1st positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:112:16 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:112:22 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:112:28 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `bytes`.', 'dataclasses_transform_converter.py:112:35 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `List[Variable[_T]]`.'] -Line 114: Unexpected errors ['dataclasses_transform_converter.py:114:0 Incompatible attribute type [8]: Attribute `field0` declared in class `DC2` has type `int` but is used as type `str`.'] -Line 115: Unexpected errors ['dataclasses_transform_converter.py:115:0 Incompatible attribute type [8]: Attribute `field3` declared in class `DC2` has type `ConverterClass` but is used as type `str`.'] -Line 116: Unexpected errors ['dataclasses_transform_converter.py:116:0 Incompatible attribute type [8]: Attribute `field3` declared in class `DC2` has type `ConverterClass` but is used as type `bytes`.'] -Line 121: Unexpected errors ['dataclasses_transform_converter.py:121:10 Incompatible parameter type [6]: In call `DC2.__init__`, for 1st positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:121:16 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:121:22 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:121:28 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `str`.', 'dataclasses_transform_converter.py:121:34 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `str`.', 'dataclasses_transform_converter.py:121:39 Incompatible parameter type [6]: In call `DC2.__init__`, for 6th positional argument, expected `Dict[str, str]` but got `Tuple[Tuple[str, str], Tuple[str, str]]`.'] -""" -output = """ -dataclasses_transform_converter.py:48:30 Incompatible parameter type [6]: In call `model_field`, for argument `converter`, expected `typing.Callable[[Variable[S]], Variable[T]]` but got `typing.Callable(bad_converter1)[[], int]`. -dataclasses_transform_converter.py:49:30 Incompatible parameter type [6]: In call `model_field`, for argument `converter`, expected `typing.Callable[[Variable[S]], Variable[T]]` but got `typing.Callable(bad_converter2)[[KeywordOnly(x, int)], int]`. -dataclasses_transform_converter.py:107:7 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:107:13 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:107:19 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `bytes`. -dataclasses_transform_converter.py:107:26 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `List[Variable[_T]]`. -dataclasses_transform_converter.py:108:4 Incompatible parameter type [6]: In call `DC2.__init__`, for 1st positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:108:10 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:108:16 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:108:22 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `int`. -dataclasses_transform_converter.py:108:25 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `List[Variable[_T]]`. -dataclasses_transform_converter.py:109:4 Incompatible parameter type [6]: In call `DC2.__init__`, for 1st positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:109:10 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:109:16 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:109:22 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `str`. -dataclasses_transform_converter.py:109:28 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `complex`. -dataclasses_transform_converter.py:112:10 Incompatible parameter type [6]: In call `DC2.__init__`, for 1st positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:112:16 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:112:22 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:112:28 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `bytes`. -dataclasses_transform_converter.py:112:35 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `List[Variable[_T]]`. -dataclasses_transform_converter.py:114:0 Incompatible attribute type [8]: Attribute `field0` declared in class `DC2` has type `int` but is used as type `str`. -dataclasses_transform_converter.py:115:0 Incompatible attribute type [8]: Attribute `field3` declared in class `DC2` has type `ConverterClass` but is used as type `str`. -dataclasses_transform_converter.py:116:0 Incompatible attribute type [8]: Attribute `field3` declared in class `DC2` has type `ConverterClass` but is used as type `bytes`. -dataclasses_transform_converter.py:119:0 Incompatible attribute type [8]: Attribute `field3` declared in class `DC2` has type `ConverterClass` but is used as type `int`. -dataclasses_transform_converter.py:121:10 Incompatible parameter type [6]: In call `DC2.__init__`, for 1st positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:121:16 Incompatible parameter type [6]: In call `DC2.__init__`, for 2nd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:121:22 Incompatible parameter type [6]: In call `DC2.__init__`, for 3rd positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:121:28 Incompatible parameter type [6]: In call `DC2.__init__`, for 4th positional argument, expected `ConverterClass` but got `str`. -dataclasses_transform_converter.py:121:34 Incompatible parameter type [6]: In call `DC2.__init__`, for 5th positional argument, expected `int` but got `str`. -dataclasses_transform_converter.py:121:39 Incompatible parameter type [6]: In call `DC2.__init__`, for 6th positional argument, expected `Dict[str, str]` but got `Tuple[Tuple[str, str], Tuple[str, str]]`. -dataclasses_transform_converter.py:130:58 Incompatible parameter type [6]: In call `model_field`, for argument `default`, expected `Optional[Variable[S]]` but got `int`. -dataclasses_transform_converter.py:133:58 Incompatible parameter type [6]: In call `model_field`, for argument `default_factory`, expected `Optional[typing.Callable[[], Variable[S]]]` but got `Type[int]`. -""" diff --git a/conformance/results/pyre/dataclasses_transform_field.toml b/conformance/results/pyre/dataclasses_transform_field.toml deleted file mode 100644 index b1750267..00000000 --- a/conformance/results/pyre/dataclasses_transform_field.toml +++ /dev/null @@ -1,19 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand dataclass transform field specifiers. -""" -output = """ -dataclasses_transform_field.py:49:42 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -dataclasses_transform_field.py:59:0 Missing argument [20]: Call `CustomerModel1.__init__` expects argument `id`. -dataclasses_transform_field.py:60:0 Missing argument [20]: Call `CustomerModel1.__init__` expects argument `id`. -dataclasses_transform_field.py:75:0 Too many arguments [19]: Call `CustomerModel2.__init__` expects 0 positional arguments, 1 was provided. -dataclasses_transform_field.py:77:0 Missing argument [20]: Call `CustomerModel2.__init__` expects argument `id`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 64: Expected 1 errors -Line 49: Unexpected errors ["dataclasses_transform_field.py:49:42 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 59: Unexpected errors ['dataclasses_transform_field.py:59:0 Missing argument [20]: Call `CustomerModel1.__init__` expects argument `id`.'] -Line 60: Unexpected errors ['dataclasses_transform_field.py:60:0 Missing argument [20]: Call `CustomerModel1.__init__` expects argument `id`.'] -Line 77: Unexpected errors ['dataclasses_transform_field.py:77:0 Missing argument [20]: Call `CustomerModel2.__init__` expects argument `id`.'] -""" diff --git a/conformance/results/pyre/dataclasses_transform_func.toml b/conformance/results/pyre/dataclasses_transform_func.toml deleted file mode 100644 index 0d764047..00000000 --- a/conformance/results/pyre/dataclasses_transform_func.toml +++ /dev/null @@ -1,41 +0,0 @@ -conformant = "Partial" -notes = """ -Does not understand @dataclass_transform when it is applied only to overloads of a decorator but not the definition. -Does not detect non-frozen class inheriting from frozen class. -Emits "attribute not initialized" error for dataclass field. -""" -output = """ -dataclasses_transform_func.py:19:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -dataclasses_transform_func.py:24:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -dataclasses_transform_func.py:34:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized. -dataclasses_transform_func.py:35:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized. -dataclasses_transform_func.py:40:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized. -dataclasses_transform_func.py:41:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized. -dataclasses_transform_func.py:46:4 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized. -dataclasses_transform_func.py:49:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`. -dataclasses_transform_func.py:52:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided. -dataclasses_transform_func.py:56:0 Incompatible attribute type [8]: Attribute `name` declared in class `Customer1` has type `str` but is used as type `int`. -dataclasses_transform_func.py:60:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`. -dataclasses_transform_func.py:64:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`. -dataclasses_transform_func.py:66:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`. -dataclasses_transform_func.py:70:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided. -dataclasses_transform_func.py:72:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`. -dataclasses_transform_func.py:90:4 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized. -dataclasses_transform_func.py:96:0 Invalid assignment [41]: Cannot reassign final attribute `c3_1.id`. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 88, 89: Expected error (tag 'Customer3Subclass') -Line 19: Unexpected errors ['dataclasses_transform_func.py:19:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -Line 24: Unexpected errors ["dataclasses_transform_func.py:24:5 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 34: Unexpected errors ['dataclasses_transform_func.py:34:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer1` to have type `int` but is never initialized.'] -Line 35: Unexpected errors ['dataclasses_transform_func.py:35:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer1` to have type `str` but is never initialized.'] -Line 40: Unexpected errors ['dataclasses_transform_func.py:40:4 Uninitialized attribute [13]: Attribute `id` is declared in class `Customer2` to have type `int` but is never initialized.'] -Line 41: Unexpected errors ['dataclasses_transform_func.py:41:4 Uninitialized attribute [13]: Attribute `name` is declared in class `Customer2` to have type `str` but is never initialized.'] -Line 46: Unexpected errors ['dataclasses_transform_func.py:46:4 Uninitialized attribute [13]: Attribute `salary` is declared in class `Customer2Subclass` to have type `float` but is never initialized.'] -Line 49: Unexpected errors ['dataclasses_transform_func.py:49:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] -Line 52: Unexpected errors ['dataclasses_transform_func.py:52:7 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 2 were provided.'] -Line 66: Unexpected errors ['dataclasses_transform_func.py:66:7 Unexpected keyword [28]: Unexpected keyword argument `id` to call `object.__init__`.'] -Line 72: Unexpected errors ['dataclasses_transform_func.py:72:5 Unsupported operand [58]: `<` is not supported for operand types `Customer2` and `Customer2`.'] -Line 90: Unexpected errors ['dataclasses_transform_func.py:90:4 Uninitialized attribute [13]: Attribute `age` is declared in class `Customer3Subclass` to have type `int` but is never initialized.'] -""" diff --git a/conformance/results/pyre/dataclasses_transform_meta.toml b/conformance/results/pyre/dataclasses_transform_meta.toml deleted file mode 100644 index ffcce3b4..00000000 --- a/conformance/results/pyre/dataclasses_transform_meta.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Partial" -notes = """ -Does not understand custom field specifiers. -Incorrectly rejects frozen dataclass that inherits from non-frozen. -Emits "attribute not initialized" error for dataclass field. -""" -output = """ -dataclasses_transform_meta.py:43:0 Invalid inheritance [39]: Frozen dataclass `Customer1` cannot inherit from non-frozen dataclass `ModelBase`. -dataclasses_transform_meta.py:51:0 Invalid inheritance [39]: Non-frozen dataclass `Customer1Subclass` cannot inherit from frozen dataclass `Customer1`. -dataclasses_transform_meta.py:60:7 Unexpected keyword [28]: Unexpected keyword argument `other_name` to call `Customer1.__init__`. -dataclasses_transform_meta.py:63:0 Invalid assignment [41]: Cannot reassign final attribute `c1_1.id`. -dataclasses_transform_meta.py:66:7 Too many arguments [19]: Call `Customer1.__init__` expects 0 positional arguments, 2 were provided. -dataclasses_transform_meta.py:73:5 Unsupported operand [58]: `<` is not supported for operand types `Customer1` and `Customer1`. -dataclasses_transform_meta.py:83:7 Too many arguments [19]: Call `Customer2.__init__` expects 0 positional arguments, 2 were provided. -dataclasses_transform_meta.py:103:0 Invalid assignment [41]: Cannot reassign final attribute `c3_1.id`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 43: Unexpected errors ['dataclasses_transform_meta.py:43:0 Invalid inheritance [39]: Frozen dataclass `Customer1` cannot inherit from non-frozen dataclass `ModelBase`.'] -Line 60: Unexpected errors ['dataclasses_transform_meta.py:60:7 Unexpected keyword [28]: Unexpected keyword argument `other_name` to call `Customer1.__init__`.'] -""" diff --git a/conformance/results/pyre/dataclasses_usage.toml b/conformance/results/pyre/dataclasses_usage.toml deleted file mode 100644 index f0a0ea0d..00000000 --- a/conformance/results/pyre/dataclasses_usage.toml +++ /dev/null @@ -1,33 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report error when field with no default follows field with default. -Complains on `assert_type` when used for bound methods vs `Callable`. -Does not understand `__dataclass_fields__`. -Incorrectly raises incompatibility type errors. -""" -output = """ -dataclasses_usage.py:50:5 Missing argument [20]: Call `InventoryItem.__init__` expects argument `unit_price`. -dataclasses_usage.py:51:27 Incompatible parameter type [6]: In call `InventoryItem.__init__`, for 2nd positional argument, expected `float` but got `str`. -dataclasses_usage.py:52:5 Too many arguments [19]: Call `InventoryItem.__init__` expects 3 positional arguments, 4 were provided. -dataclasses_usage.py:72:4 Undefined attribute [16]: `typing.Type` has no attribute `a`. -dataclasses_usage.py:83:5 Too many arguments [19]: Call `DC4.__init__` expects 1 positional argument, 2 were provided. -dataclasses_usage.py:88:4 Incompatible attribute type [8]: Attribute `a` declared in class `DC5` has type `int` but is used as type `str`. -dataclasses_usage.py:127:0 Too many arguments [19]: Call `DC7.__init__` expects 1 positional argument, 2 were provided. -dataclasses_usage.py:130:0 Missing argument [20]: Call `DC8.__init__` expects argument `y`. -dataclasses_usage.py:173:4 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized. -dataclasses_usage.py:174:4 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized. -dataclasses_usage.py:179:0 Too many arguments [19]: Call `object.__init__` expects 0 positional arguments, 1 was provided. -dataclasses_usage.py:205:0 Incompatible variable type [9]: v7 is declared to have type `DataclassProto` but is used as type `DC15`. -dataclasses_usage.py:213:0 Assert type [70]: Expected `DC16[int]` but got `DC16[typing_extensions.Literal[1]]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 58, 61: Expected error (tag 'DC1') -Lines 64, 67: Expected error (tag 'DC2') -Lines 70, 73: Expected error (tag 'DC3') -Line 72: Unexpected errors ['dataclasses_usage.py:72:4 Undefined attribute [16]: `typing.Type` has no attribute `a`.'] -Line 173: Unexpected errors ['dataclasses_usage.py:173:4 Uninitialized attribute [13]: Attribute `x` is declared in class `DC13` to have type `int` but is never initialized.'] -Line 174: Unexpected errors ['dataclasses_usage.py:174:4 Uninitialized attribute [13]: Attribute `x_squared` is declared in class `DC13` to have type `int` but is never initialized.'] -Line 205: Unexpected errors ['dataclasses_usage.py:205:0 Incompatible variable type [9]: v7 is declared to have type `DataclassProto` but is used as type `DC15`.'] -Line 213: Unexpected errors ['dataclasses_usage.py:213:0 Assert type [70]: Expected `DC16[int]` but got `DC16[typing_extensions.Literal[1]]`.'] -""" diff --git a/conformance/results/pyre/directives_assert_type.toml b/conformance/results/pyre/directives_assert_type.toml deleted file mode 100644 index 7c81101d..00000000 --- a/conformance/results/pyre/directives_assert_type.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -directives_assert_type.py:27:4 Assert type [70]: Expected `int` but got `Union[int, str]`. -directives_assert_type.py:28:4 Assert type [70]: Expected `int` but got `typing.Any`. -directives_assert_type.py:29:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[4]`. -directives_assert_type.py:31:4 Missing argument [20]: Call `assert_type` expects argument in position 0. -directives_assert_type.py:32:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal['']`. -directives_assert_type.py:33:4 Too many arguments [19]: Call `assert_type` expects 2 positional arguments, 3 were provided. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_cast.toml b/conformance/results/pyre/directives_cast.toml deleted file mode 100644 index 8046276e..00000000 --- a/conformance/results/pyre/directives_cast.toml +++ /dev/null @@ -1,9 +0,0 @@ -conformant = "Pass" -output = """ -directives_cast.py:15:7 Missing argument [20]: Call `cast` expects argument `typ`. -directives_cast.py:16:12 Invalid type [31]: Expression `1` is not a valid type. -directives_cast.py:17:7 Too many arguments [19]: Call `cast` expects 2 positional arguments, 3 were provided. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_deprecated.toml b/conformance/results/pyre/directives_deprecated.toml deleted file mode 100644 index 2442ee8f..00000000 --- a/conformance/results/pyre/directives_deprecated.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support @deprecated. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 18: Expected 1 errors -Line 24: Expected 1 errors -Line 25: Expected 1 errors -Line 30: Expected 1 errors -Line 41: Expected 1 errors -Line 42: Expected 1 errors -Line 44: Expected 1 errors -Line 47: Expected 1 errors -Line 48: Expected 1 errors -Line 58: Expected 1 errors -Line 69: Expected 1 errors -Line 98: Expected 1 errors -""" -output = """ -""" diff --git a/conformance/results/pyre/directives_no_type_check.toml b/conformance/results/pyre/directives_no_type_check.toml deleted file mode 100644 index f08913ea..00000000 --- a/conformance/results/pyre/directives_no_type_check.toml +++ /dev/null @@ -1,15 +0,0 @@ -conformant = "Pass" -notes = """ -Does not honor @no_type_check decorator. -""" -output = """ -directives_no_type_check.py:15:4 Incompatible attribute type [8]: Attribute `x` declared in class `ClassA` has type `int` but is used as type `str`. -directives_no_type_check.py:25:12 Unsupported operand [58]: `+` is not supported for operand types `int` and `str`. -directives_no_type_check.py:26:4 Incompatible return type [7]: Expected `None` but got `int`. -directives_no_type_check.py:29:6 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `int` but got `bytes`. -directives_no_type_check.py:29:18 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `str` but got `bytes`. -directives_no_type_check.py:32:0 Missing argument [20]: Call `func1` expects argument `a`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_reveal_type.toml b/conformance/results/pyre/directives_reveal_type.toml deleted file mode 100644 index 64a213ec..00000000 --- a/conformance/results/pyre/directives_reveal_type.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -directives_reveal_type.py:14:4 Revealed type [-1]: Revealed type for `a` is `typing.Union[int, str]`. -directives_reveal_type.py:15:4 Revealed type [-1]: Revealed type for `b` is `typing.List[int]`. -directives_reveal_type.py:16:4 Revealed type [-1]: Revealed type for `c` is `typing.Any`. -directives_reveal_type.py:17:4 Revealed type [-1]: Revealed type for `d` is `ForwardReference`. -directives_reveal_type.py:19:4 Missing argument [20]: Call `reveal_type` expects argument in position 0. -directives_reveal_type.py:20:4 Too many arguments [19]: Call `reveal_type` expects 1 positional argument, 2 were provided. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_type_checking.toml b/conformance/results/pyre/directives_type_checking.toml deleted file mode 100644 index 5e485e85..00000000 --- a/conformance/results/pyre/directives_type_checking.toml +++ /dev/null @@ -1,6 +0,0 @@ -conformant = "Pass" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_type_ignore.toml b/conformance/results/pyre/directives_type_ignore.toml deleted file mode 100644 index 5e485e85..00000000 --- a/conformance/results/pyre/directives_type_ignore.toml +++ /dev/null @@ -1,6 +0,0 @@ -conformant = "Pass" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_type_ignore_file1.toml b/conformance/results/pyre/directives_type_ignore_file1.toml deleted file mode 100644 index 07cd73b2..00000000 --- a/conformance/results/pyre/directives_type_ignore_file1.toml +++ /dev/null @@ -1,8 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_type_ignore_file2.toml b/conformance/results/pyre/directives_type_ignore_file2.toml deleted file mode 100644 index 7e43e7dc..00000000 --- a/conformance/results/pyre/directives_type_ignore_file2.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ -directives_type_ignore_file2.py:14:0 Incompatible variable type [9]: x is declared to have type `int` but is used as type `str`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/directives_version_platform.toml b/conformance/results/pyre/directives_version_platform.toml deleted file mode 100644 index 01d4e4b4..00000000 --- a/conformance/results/pyre/directives_version_platform.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -directives_version_platform.py:40:4 Incompatible variable type [9]: val7 is declared to have type `int` but is used as type `str`. -directives_version_platform.py:45:4 Incompatible variable type [9]: val8 is declared to have type `int` but is used as type `str`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/enums_behaviors.toml b/conformance/results/pyre/enums_behaviors.toml deleted file mode 100644 index d1c240fc..00000000 --- a/conformance/results/pyre/enums_behaviors.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Pass" -notes = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -enums_behaviors.py:28:0 Assert type [70]: Expected `typing_extensions.Literal[Color.RED]` but got `Color`. -enums_behaviors.py:32:0 Assert type [70]: Expected `typing_extensions.Literal[Color.BLUE]` but got `Color`. -enums_behaviors.py:44:0 Invalid inheritance [39]: Cannot inherit from final enum `Shape`. Enums with defined members cannot be extended. -""" diff --git a/conformance/results/pyre/enums_definition.toml b/conformance/results/pyre/enums_definition.toml deleted file mode 100644 index 7e80103f..00000000 --- a/conformance/results/pyre/enums_definition.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Pass" -notes = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -enums_definition.py:24:9 Too many arguments [19]: Call `Enum.__new__` expects 1 positional argument, 4 were provided. -enums_definition.py:27:9 Too many arguments [19]: Call `Enum.__new__` expects 1 positional argument, 2 were provided. -enums_definition.py:28:9 Too many arguments [19]: Call `Enum.__new__` expects 1 positional argument, 2 were provided. -enums_definition.py:31:9 Too many arguments [19]: Call `Enum.__new__` expects 1 positional argument, 2 were provided. -enums_definition.py:33:12 Undefined attribute [16]: `Enum` has no attribute `RED`. -enums_definition.py:38:0 Assert type [70]: Expected `typing_extensions.Literal[Color7.RED]` but got `unknown`. -enums_definition.py:38:12 Undefined attribute [16]: `Color7` has no attribute `RED`. -enums_definition.py:39:0 Assert type [70]: Expected `typing_extensions.Literal[Color8.RED]` but got `unknown`. -enums_definition.py:39:12 Undefined attribute [16]: `Color8` has no attribute `RED`. -""" diff --git a/conformance/results/pyre/enums_expansion.toml b/conformance/results/pyre/enums_expansion.toml deleted file mode 100644 index 340065e0..00000000 --- a/conformance/results/pyre/enums_expansion.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Pass" -notes = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -enums_expansion.py:25:8 Assert type [70]: Expected `typing_extensions.Literal[Color.GREEN]` but got `Color`. -enums_expansion.py:35:12 Assert type [70]: Expected `Never` but got `Color`. -enums_expansion.py:53:8 Assert type [70]: Expected `typing_extensions.Literal[CustomFlags.FLAG3]` but got `CustomFlags`. -""" diff --git a/conformance/results/pyre/enums_member_names.toml b/conformance/results/pyre/enums_member_names.toml deleted file mode 100644 index 263b2fab..00000000 --- a/conformance/results/pyre/enums_member_names.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Pass" -notes = """ -Does not support special-cased handling of member name literal types (optional). -""" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -enums_member_names.py:21:0 Assert type [70]: Expected `typing_extensions.Literal['RED']` but got `str`. -enums_member_names.py:22:0 Assert type [70]: Expected `typing_extensions.Literal['RED']` but got `str`. -enums_member_names.py:26:4 Assert type [70]: Expected `Union[typing_extensions.Literal['BLUE'], typing_extensions.Literal['RED']]` but got `str`. -enums_member_names.py:30:4 Assert type [70]: Expected `Union[typing_extensions.Literal['BLUE'], typing_extensions.Literal['GREEN'], typing_extensions.Literal['RED']]` but got `str`. -""" diff --git a/conformance/results/pyre/enums_member_values.toml b/conformance/results/pyre/enums_member_values.toml deleted file mode 100644 index e14ce8a6..00000000 --- a/conformance/results/pyre/enums_member_values.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Pass" -notes = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" -output = """ -enums_member_values.py:21:0 Assert type [70]: Expected `typing_extensions.Literal[1]` but got `typing.Any`. -enums_member_values.py:22:0 Assert type [70]: Expected `typing_extensions.Literal[1]` but got `typing.Any`. -enums_member_values.py:26:4 Assert type [70]: Expected `Union[typing_extensions.Literal[1], typing_extensions.Literal[3]]` but got `typing.Any`. -enums_member_values.py:30:4 Assert type [70]: Expected `Union[typing_extensions.Literal[1], typing_extensions.Literal[2], typing_extensions.Literal[3]]` but got `typing.Any`. -enums_member_values.py:54:0 Assert type [70]: Expected `typing_extensions.Literal[1]` but got `typing.Any`. -enums_member_values.py:68:0 Assert type [70]: Expected `typing_extensions.Literal[1]` but got `typing.Any`. -enums_member_values.py:78:4 Incompatible attribute type [8]: Attribute `GREEN` declared in class `Color3` has type `int` but is used as type `str`. -enums_member_values.py:85:8 Incompatible attribute type [8]: Attribute `_value_` declared in class `Planet2` has type `str` but is used as type `int`. -enums_member_values.py:96:0 Assert type [70]: Expected `int` but got `typing.Any`. -""" diff --git a/conformance/results/pyre/enums_members.toml b/conformance/results/pyre/enums_members.toml deleted file mode 100644 index 91220359..00000000 --- a/conformance/results/pyre/enums_members.toml +++ /dev/null @@ -1,28 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of annotation with enum member. -Does not treat callables as non-members. -Does not treat annotated attributes as non-members. -Does not honor `enum.nonmember` to define non-member attribute. -Does not honor `enum.member` as method decorator. -Does not properly handle aliased enum members. -Rejects use of `_ignore_`. -Does not support `_ignore_` mechanism (optional). -""" -conformance_automated = "Fail" -errors_diff = """ -Line 82: Expected 1 errors -Line 83: Expected 1 errors -Line 116: Expected 1 errors -Line 129: Expected 1 errors -Line 100: Unexpected errors ['enums_members.py:100:0 Assert type [70]: Expected `typing_extensions.Literal[TrafficLight.YELLOW]` but got `typing_extensions.Literal[TrafficLight.AMBER]`.'] -""" -output = """ -enums_members.py:50:4 Illegal annotation target [35]: Target `enums_members.Pet3.DOG` cannot be annotated as it is an enum member. Enum value types can be specified by annotating the `_value_` attribute. -enums_members.py:84:0 Assert type [70]: Expected `typing_extensions.Literal[Pet4.species]` but got `str`. -enums_members.py:85:0 Assert type [70]: Expected `typing_extensions.Literal[Pet4.speak]` but got `typing.Callable(Pet4.speak)[[Named(self, Pet4)], None]`. -enums_members.py:100:0 Assert type [70]: Expected `typing_extensions.Literal[TrafficLight.YELLOW]` but got `typing_extensions.Literal[TrafficLight.AMBER]`. -enums_members.py:128:8 Revealed type [-1]: Revealed type for `enums_members.Example2._Example2__B` is `typing_extensions.Literal[Example2._Example2__B]` (final). -enums_members.py:146:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[Pet5.DOG]`. -enums_members.py:147:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[Pet5.FISH]`. -""" diff --git a/conformance/results/pyre/exceptions_context_managers.toml b/conformance/results/pyre/exceptions_context_managers.toml deleted file mode 100644 index 507ba624..00000000 --- a/conformance/results/pyre/exceptions_context_managers.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Partial" -notes = """ -assert_type causes failures. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 50: Unexpected errors ['exceptions_context_managers.py:50:4 Assert type [70]: Expected `Union[int, str]` but got `str`.'] -Line 57: Unexpected errors ['exceptions_context_managers.py:57:4 Assert type [70]: Expected `Union[int, str]` but got `str`.'] -""" -output = """ -exceptions_context_managers.py:50:4 Assert type [70]: Expected `Union[int, str]` but got `str`. -exceptions_context_managers.py:57:4 Assert type [70]: Expected `Union[int, str]` but got `str`. -""" diff --git a/conformance/results/pyre/generics_base_class.toml b/conformance/results/pyre/generics_base_class.toml deleted file mode 100644 index 3cac3f43..00000000 --- a/conformance/results/pyre/generics_base_class.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject illegal use of Generic. -Does not allow using generic in assert_type expression. -Does not detect inconsistent type variable ordering. -""" -output = """ -generics_base_class.py:26:25 Incompatible parameter type [6]: In call `takes_dict_incorrect`, for 1st positional argument, expected `Dict[str, List[object]]` but got `SymbolTable`. -generics_base_class.py:49:21 Invalid type parameters [24]: Generic type `LinkedList` expects 1 type parameter, received 2. -generics_base_class.py:61:17 Invalid type parameters [24]: Generic type `MyDict` expects 1 type parameter, received 2. -generics_base_class.py:68:0 Duplicate type variables [59]: Duplicate type variable `T` in Generic[...]. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 30: Expected 1 errors -Line 98: Expected 1 errors -""" diff --git a/conformance/results/pyre/generics_basic.toml b/conformance/results/pyre/generics_basic.toml deleted file mode 100644 index 2aab0059..00000000 --- a/conformance/results/pyre/generics_basic.toml +++ /dev/null @@ -1,30 +0,0 @@ -conformant = "Partial" -notes = """ -False positives in examples using constrained type variables. -False negative for constraint parameterized by a type variable. -False negative in custom map example. -False positive using `iter`. -False negative for bad type arguments to Generic/Protocol. -False negative for generic metaclass. -""" -output = """ -generics_basic.py:34:4 Incompatible return type [7]: Expected `Variable[AnyStr <: [str, bytes]]` but got `str`. -generics_basic.py:34:15 Incompatible parameter type [6]: In call `str.__add__`, for 1st positional argument, expected `str` but got `Variable[AnyStr <: [str, bytes]]`. -generics_basic.py:40:14 Incompatible parameter type [6]: In call `concat`, for 2nd positional argument, expected `Variable[AnyStr <: [str, bytes]]` but got `bytes`. -generics_basic.py:41:14 Incompatible parameter type [6]: In call `concat`, for 2nd positional argument, expected `Variable[AnyStr <: [str, bytes]]` but got `str`. -generics_basic.py:49:0 Invalid type [31]: TypeVar can't have a single explicit constraint. Did you mean `bound=str`? -generics_basic.py:69:14 Incompatible parameter type [6]: In call `concat`, for 2nd positional argument, expected `Variable[AnyStr <: [str, bytes]]` but got `bytes`. -generics_basic.py:121:0 Duplicate type variables [59]: Duplicate type variable `T` in Generic[...]. -generics_basic.py:157:7 Incompatible parameter type [6]: In call `typing.Mapping.__getitem__`, for 1st positional argument, expected `str` but got `int`. -generics_basic.py:158:7 Incompatible parameter type [6]: In call `typing.Mapping.__getitem__`, for 1st positional argument, expected `str` but got `int`. -generics_basic.py:171:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T_co]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T_co]`. -generics_basic.py:172:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T_co]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T_co]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 55: Expected 1 errors -Line 162: Expected 1 errors -Line 163: Expected 1 errors -Line 208: Expected 1 errors -Line 34: Unexpected errors ['generics_basic.py:34:4 Incompatible return type [7]: Expected `Variable[AnyStr <: [str, bytes]]` but got `str`.', 'generics_basic.py:34:15 Incompatible parameter type [6]: In call `str.__add__`, for 1st positional argument, expected `str` but got `Variable[AnyStr <: [str, bytes]]`.'] -""" diff --git a/conformance/results/pyre/generics_defaults.toml b/conformance/results/pyre/generics_defaults.toml deleted file mode 100644 index b758eed3..00000000 --- a/conformance/results/pyre/generics_defaults.toml +++ /dev/null @@ -1,112 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support generic defaults. -""" -output = """ -generics_defaults.py:24:31 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type. -generics_defaults.py:24:31 Undefined or invalid type [11]: Annotation `T` is not defined as a type. -generics_defaults.py:27:20 Undefined or invalid type [11]: Annotation `DefaultIntT` is not defined as a type. -generics_defaults.py:30:0 Assert type [70]: Expected `Type[NoNonDefaults[]]` but got `Type[NoNonDefaults]`. -generics_defaults.py:30:27 Invalid type parameters [24]: Non-generic type `NoNonDefaults` cannot take parameters. -generics_defaults.py:31:0 Assert type [70]: Expected `Type[NoNonDefaults[]]` but got `typing.Any`. -generics_defaults.py:31:12 Undefined attribute [16]: `NoNonDefaults` has no attribute `__getitem__`. -generics_defaults.py:31:32 Invalid type parameters [24]: Non-generic type `NoNonDefaults` cannot take parameters. -generics_defaults.py:32:0 Assert type [70]: Expected `Type[NoNonDefaults[]]` but got `typing.Any`. -generics_defaults.py:32:37 Invalid type parameters [24]: Non-generic type `NoNonDefaults` cannot take parameters. -generics_defaults.py:35:17 Undefined or invalid type [11]: Annotation `DefaultBoolT` is not defined as a type. -generics_defaults.py:38:0 Assert type [70]: Expected `Type[OneDefault[]]` but got `typing.Any`. -generics_defaults.py:38:12 Undefined attribute [16]: `OneDefault` has no attribute `__getitem__`. -generics_defaults.py:38:31 Invalid type parameters [24]: Non-generic type `OneDefault` cannot take parameters. -generics_defaults.py:39:0 Assert type [70]: Expected `OneDefault[]` but got `typing.Any`. -generics_defaults.py:39:33 Invalid type parameters [24]: Non-generic type `OneDefault` cannot take parameters. -generics_defaults.py:42:21 Undefined or invalid type [11]: Annotation `T1` is not defined as a type. -generics_defaults.py:42:21 Undefined or invalid type [11]: Annotation `T2` is not defined as a type. -generics_defaults.py:45:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `Type[AllTheDefaults]`. -generics_defaults.py:45:28 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters. -generics_defaults.py:46:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`. -generics_defaults.py:47:4 Undefined attribute [16]: `AllTheDefaults` has no attribute `__getitem__`. -generics_defaults.py:47:34 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters. -generics_defaults.py:52:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`. -generics_defaults.py:53:34 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters. -generics_defaults.py:55:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`. -generics_defaults.py:57:4 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters. -generics_defaults.py:59:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`. -generics_defaults.py:61:4 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters. -generics_defaults.py:63:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`. -generics_defaults.py:65:4 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters. -generics_defaults.py:76:22 Undefined or invalid type [11]: Annotation `DefaultP` is not defined as a type. -generics_defaults.py:79:0 Assert type [70]: Expected `Type[Class_ParamSpec[]]` but got `Type[Class_ParamSpec]`. -generics_defaults.py:79:29 Invalid type parameters [24]: Non-generic type `Class_ParamSpec` cannot take parameters. -generics_defaults.py:80:0 Assert type [70]: Expected `Class_ParamSpec[]` but got `Class_ParamSpec`. -generics_defaults.py:80:31 Invalid type parameters [24]: Non-generic type `Class_ParamSpec` cannot take parameters. -generics_defaults.py:81:0 Assert type [70]: Expected `Class_ParamSpec[]` but got `typing.Any`. -generics_defaults.py:81:12 Undefined attribute [16]: `Class_ParamSpec` has no attribute `__getitem__`. -generics_defaults.py:81:45 Invalid type parameters [24]: Non-generic type `Class_ParamSpec` cannot take parameters. -generics_defaults.py:91:25 Undefined or invalid type [11]: Annotation `DefaultTs` is not defined as a type. -generics_defaults.py:94:0 Assert type [70]: Expected `Type[Class_TypeVarTuple[]]` but got `Type[Class_TypeVarTuple]`. -generics_defaults.py:94:32 Invalid type parameters [24]: Non-generic type `Class_TypeVarTuple` cannot take parameters. -generics_defaults.py:95:0 Assert type [70]: Expected `Class_TypeVarTuple[]` but got `Class_TypeVarTuple`. -generics_defaults.py:95:34 Invalid type parameters [24]: Non-generic type `Class_TypeVarTuple` cannot take parameters. -generics_defaults.py:96:0 Assert type [70]: Expected `Class_TypeVarTuple[]` but got `typing.Any`. -generics_defaults.py:96:12 Undefined attribute [16]: `Class_TypeVarTuple` has no attribute `__getitem__`. -generics_defaults.py:96:45 Invalid type parameters [24]: Non-generic type `Class_TypeVarTuple` cannot take parameters. -generics_defaults.py:99:67 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVarTuple`. -generics_defaults.py:127:13 Undefined or invalid type [11]: Annotation `T4` is not defined as a type. -generics_defaults.py:130:0 Assert type [70]: Expected `int` but got `unknown`. -generics_defaults.py:131:0 Assert type [70]: Expected `typing.Any` but got `unknown`. -generics_defaults.py:142:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Ts`. -generics_defaults.py:142:11 Undefined or invalid type [11]: Annotation `T5` is not defined as a type. -generics_defaults.py:152:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Ts`. -generics_defaults.py:152:11 Undefined or invalid type [11]: Annotation `P` is not defined as a type. -generics_defaults.py:155:0 Assert type [70]: Expected `Type[Foo6[]]` but got `typing.Any`. -generics_defaults.py:155:12 Undefined attribute [16]: `Foo6` has no attribute `__getitem__`. -generics_defaults.py:155:28 Invalid type parameters [24]: Non-generic type `Foo6` cannot take parameters. -generics_defaults.py:156:0 Assert type [70]: Expected `Type[Foo6[]]` but got `typing.Any`. -generics_defaults.py:156:37 Invalid type parameters [24]: Non-generic type `Foo6` cannot take parameters. -generics_defaults.py:170:0 Assert type [70]: Expected `typing.Callable[[Foo7[]], Foo7[]]` but got `typing.Callable(Foo7.meth)[[Variable[_Self_generics_defaults_Foo7__ (bound to Foo7)]], Variable[_Self_generics_defaults_Foo7__ (bound to Foo7)]]`. -generics_defaults.py:170:23 Invalid type parameters [24]: Non-generic type `Foo7` cannot take parameters. -generics_defaults.py:171:0 Assert type [70]: Expected `int` but got `unknown`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 50: Expected 1 errors -Line 107: Expected 1 errors -Line 114: Expected 1 errors -Lines 130, 131: Expected exactly one error (tag 'optional-default-use') -Line 27: Unexpected errors ['generics_defaults.py:27:20 Undefined or invalid type [11]: Annotation `DefaultIntT` is not defined as a type.'] -Line 30: Unexpected errors ['generics_defaults.py:30:0 Assert type [70]: Expected `Type[NoNonDefaults[]]` but got `Type[NoNonDefaults]`.', 'generics_defaults.py:30:27 Invalid type parameters [24]: Non-generic type `NoNonDefaults` cannot take parameters.'] -Line 31: Unexpected errors ['generics_defaults.py:31:0 Assert type [70]: Expected `Type[NoNonDefaults[]]` but got `typing.Any`.', 'generics_defaults.py:31:12 Undefined attribute [16]: `NoNonDefaults` has no attribute `__getitem__`.', 'generics_defaults.py:31:32 Invalid type parameters [24]: Non-generic type `NoNonDefaults` cannot take parameters.'] -Line 32: Unexpected errors ['generics_defaults.py:32:0 Assert type [70]: Expected `Type[NoNonDefaults[]]` but got `typing.Any`.', 'generics_defaults.py:32:37 Invalid type parameters [24]: Non-generic type `NoNonDefaults` cannot take parameters.'] -Line 35: Unexpected errors ['generics_defaults.py:35:17 Undefined or invalid type [11]: Annotation `DefaultBoolT` is not defined as a type.'] -Line 38: Unexpected errors ['generics_defaults.py:38:0 Assert type [70]: Expected `Type[OneDefault[]]` but got `typing.Any`.', 'generics_defaults.py:38:12 Undefined attribute [16]: `OneDefault` has no attribute `__getitem__`.', 'generics_defaults.py:38:31 Invalid type parameters [24]: Non-generic type `OneDefault` cannot take parameters.'] -Line 39: Unexpected errors ['generics_defaults.py:39:0 Assert type [70]: Expected `OneDefault[]` but got `typing.Any`.', 'generics_defaults.py:39:33 Invalid type parameters [24]: Non-generic type `OneDefault` cannot take parameters.'] -Line 42: Unexpected errors ['generics_defaults.py:42:21 Undefined or invalid type [11]: Annotation `T1` is not defined as a type.', 'generics_defaults.py:42:21 Undefined or invalid type [11]: Annotation `T2` is not defined as a type.'] -Line 45: Unexpected errors ['generics_defaults.py:45:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `Type[AllTheDefaults]`.', 'generics_defaults.py:45:28 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters.'] -Line 46: Unexpected errors ['generics_defaults.py:46:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`.'] -Line 47: Unexpected errors ['generics_defaults.py:47:4 Undefined attribute [16]: `AllTheDefaults` has no attribute `__getitem__`.', 'generics_defaults.py:47:34 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters.'] -Line 52: Unexpected errors ['generics_defaults.py:52:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`.'] -Line 53: Unexpected errors ['generics_defaults.py:53:34 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters.'] -Line 55: Unexpected errors ['generics_defaults.py:55:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`.'] -Line 57: Unexpected errors ['generics_defaults.py:57:4 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters.'] -Line 59: Unexpected errors ['generics_defaults.py:59:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`.'] -Line 61: Unexpected errors ['generics_defaults.py:61:4 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters.'] -Line 63: Unexpected errors ['generics_defaults.py:63:0 Assert type [70]: Expected `Type[AllTheDefaults[]]` but got `typing.Any`.'] -Line 65: Unexpected errors ['generics_defaults.py:65:4 Invalid type parameters [24]: Non-generic type `AllTheDefaults` cannot take parameters.'] -Line 76: Unexpected errors ['generics_defaults.py:76:22 Undefined or invalid type [11]: Annotation `DefaultP` is not defined as a type.'] -Line 79: Unexpected errors ['generics_defaults.py:79:0 Assert type [70]: Expected `Type[Class_ParamSpec[]]` but got `Type[Class_ParamSpec]`.', 'generics_defaults.py:79:29 Invalid type parameters [24]: Non-generic type `Class_ParamSpec` cannot take parameters.'] -Line 80: Unexpected errors ['generics_defaults.py:80:0 Assert type [70]: Expected `Class_ParamSpec[]` but got `Class_ParamSpec`.', 'generics_defaults.py:80:31 Invalid type parameters [24]: Non-generic type `Class_ParamSpec` cannot take parameters.'] -Line 81: Unexpected errors ['generics_defaults.py:81:0 Assert type [70]: Expected `Class_ParamSpec[]` but got `typing.Any`.', 'generics_defaults.py:81:12 Undefined attribute [16]: `Class_ParamSpec` has no attribute `__getitem__`.', 'generics_defaults.py:81:45 Invalid type parameters [24]: Non-generic type `Class_ParamSpec` cannot take parameters.'] -Line 91: Unexpected errors ['generics_defaults.py:91:25 Undefined or invalid type [11]: Annotation `DefaultTs` is not defined as a type.'] -Line 94: Unexpected errors ['generics_defaults.py:94:0 Assert type [70]: Expected `Type[Class_TypeVarTuple[]]` but got `Type[Class_TypeVarTuple]`.', 'generics_defaults.py:94:32 Invalid type parameters [24]: Non-generic type `Class_TypeVarTuple` cannot take parameters.'] -Line 95: Unexpected errors ['generics_defaults.py:95:0 Assert type [70]: Expected `Class_TypeVarTuple[]` but got `Class_TypeVarTuple`.', 'generics_defaults.py:95:34 Invalid type parameters [24]: Non-generic type `Class_TypeVarTuple` cannot take parameters.'] -Line 96: Unexpected errors ['generics_defaults.py:96:0 Assert type [70]: Expected `Class_TypeVarTuple[]` but got `typing.Any`.', 'generics_defaults.py:96:12 Undefined attribute [16]: `Class_TypeVarTuple` has no attribute `__getitem__`.', 'generics_defaults.py:96:45 Invalid type parameters [24]: Non-generic type `Class_TypeVarTuple` cannot take parameters.'] -Line 99: Unexpected errors ['generics_defaults.py:99:67 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T]]` but got `TypeVarTuple`.'] -Line 127: Unexpected errors ['generics_defaults.py:127:13 Undefined or invalid type [11]: Annotation `T4` is not defined as a type.'] -Line 130: Unexpected errors ['generics_defaults.py:130:0 Assert type [70]: Expected `int` but got `unknown`.'] -Line 131: Unexpected errors ['generics_defaults.py:131:0 Assert type [70]: Expected `typing.Any` but got `unknown`.'] -Line 152: Unexpected errors ["generics_defaults.py:152:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Ts`.", 'generics_defaults.py:152:11 Undefined or invalid type [11]: Annotation `P` is not defined as a type.'] -Line 155: Unexpected errors ['generics_defaults.py:155:0 Assert type [70]: Expected `Type[Foo6[]]` but got `typing.Any`.', 'generics_defaults.py:155:12 Undefined attribute [16]: `Foo6` has no attribute `__getitem__`.', 'generics_defaults.py:155:28 Invalid type parameters [24]: Non-generic type `Foo6` cannot take parameters.'] -Line 156: Unexpected errors ['generics_defaults.py:156:0 Assert type [70]: Expected `Type[Foo6[]]` but got `typing.Any`.', 'generics_defaults.py:156:37 Invalid type parameters [24]: Non-generic type `Foo6` cannot take parameters.'] -Line 170: Unexpected errors ['generics_defaults.py:170:0 Assert type [70]: Expected `typing.Callable[[Foo7[]], Foo7[]]` but got `typing.Callable(Foo7.meth)[[Variable[_Self_generics_defaults_Foo7__ (bound to Foo7)]], Variable[_Self_generics_defaults_Foo7__ (bound to Foo7)]]`.', 'generics_defaults.py:170:23 Invalid type parameters [24]: Non-generic type `Foo7` cannot take parameters.'] -Line 171: Unexpected errors ['generics_defaults.py:171:0 Assert type [70]: Expected `int` but got `unknown`.'] -""" diff --git a/conformance/results/pyre/generics_defaults_referential.toml b/conformance/results/pyre/generics_defaults_referential.toml deleted file mode 100644 index d7759bb4..00000000 --- a/conformance/results/pyre/generics_defaults_referential.toml +++ /dev/null @@ -1,61 +0,0 @@ -conformant = "Unsupported" -output = """ -generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StartT` is not defined as a type. -generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StepT` is not defined as a type. -generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StopT` is not defined as a type. -generics_defaults_referential.py:23:0 Assert type [70]: Expected `Type[slice[]]` but got `Type[slice]`. -generics_defaults_referential.py:23:19 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters. -generics_defaults_referential.py:24:0 Assert type [70]: Expected `slice[]` but got `slice`. -generics_defaults_referential.py:24:21 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters. -generics_defaults_referential.py:25:0 Assert type [70]: Expected `slice[]` but got `typing.Any`. -generics_defaults_referential.py:25:12 Undefined attribute [16]: `slice` has no attribute `__getitem__`. -generics_defaults_referential.py:25:26 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters. -generics_defaults_referential.py:26:0 Assert type [70]: Expected `slice[]` but got `typing.Any`. -generics_defaults_referential.py:26:41 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters. -generics_defaults_referential.py:31:10 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type. -generics_defaults_referential.py:31:10 Undefined or invalid type [11]: Annotation `T2` is not defined as a type. -generics_defaults_referential.py:35:0 Assert type [70]: Expected `Foo[]` but got `Foo`. -generics_defaults_referential.py:35:24 Invalid type parameters [24]: Non-generic type `Foo` cannot take parameters. -generics_defaults_referential.py:36:0 Undefined attribute [16]: `Foo` has no attribute `__getitem__`. -generics_defaults_referential.py:46:11 Undefined or invalid type [11]: Annotation `S1` is not defined as a type. -generics_defaults_referential.py:46:11 Undefined or invalid type [11]: Annotation `S2` is not defined as a type. -generics_defaults_referential.py:53:13 Undefined or invalid type [11]: Annotation `Start2T` is not defined as a type. -generics_defaults_referential.py:53:13 Undefined or invalid type [11]: Annotation `Stop2T` is not defined as a type. -generics_defaults_referential.py:87:47 Undefined attribute [16]: `list` has no attribute `__getitem__`. -generics_defaults_referential.py:90:10 Undefined or invalid type [11]: Annotation `ListDefaultT` is not defined as a type. -generics_defaults_referential.py:90:10 Undefined or invalid type [11]: Annotation `Z1` is not defined as a type. -generics_defaults_referential.py:94:0 Assert type [70]: Expected `Type[Bar[]]` but got `Type[Bar]`. -generics_defaults_referential.py:94:17 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_referential.py:95:0 Assert type [70]: Expected `Type[Bar[]]` but got `typing.Any`. -generics_defaults_referential.py:95:12 Undefined attribute [16]: `Bar` has no attribute `__getitem__`. -generics_defaults_referential.py:95:22 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_referential.py:96:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`. -generics_defaults_referential.py:96:29 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_referential.py:97:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`. -generics_defaults_referential.py:97:40 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_referential.py:98:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`. -generics_defaults_referential.py:98:34 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 37: Expected 1 errors -Line 60: Expected 1 errors -Line 68: Expected 1 errors -Line 74: Expected 1 errors -Line 78: Expected 1 errors -Line 20: Unexpected errors ['generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StartT` is not defined as a type.', 'generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StepT` is not defined as a type.', 'generics_defaults_referential.py:20:12 Undefined or invalid type [11]: Annotation `StopT` is not defined as a type.'] -Line 23: Unexpected errors ['generics_defaults_referential.py:23:0 Assert type [70]: Expected `Type[slice[]]` but got `Type[slice]`.', 'generics_defaults_referential.py:23:19 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters.'] -Line 24: Unexpected errors ['generics_defaults_referential.py:24:0 Assert type [70]: Expected `slice[]` but got `slice`.', 'generics_defaults_referential.py:24:21 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters.'] -Line 25: Unexpected errors ['generics_defaults_referential.py:25:0 Assert type [70]: Expected `slice[]` but got `typing.Any`.', 'generics_defaults_referential.py:25:12 Undefined attribute [16]: `slice` has no attribute `__getitem__`.', 'generics_defaults_referential.py:25:26 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters.'] -Line 26: Unexpected errors ['generics_defaults_referential.py:26:0 Assert type [70]: Expected `slice[]` but got `typing.Any`.', 'generics_defaults_referential.py:26:41 Invalid type parameters [24]: Non-generic type `slice` cannot take parameters.'] -Line 31: Unexpected errors ['generics_defaults_referential.py:31:10 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type.', 'generics_defaults_referential.py:31:10 Undefined or invalid type [11]: Annotation `T2` is not defined as a type.'] -Line 35: Unexpected errors ['generics_defaults_referential.py:35:0 Assert type [70]: Expected `Foo[]` but got `Foo`.', 'generics_defaults_referential.py:35:24 Invalid type parameters [24]: Non-generic type `Foo` cannot take parameters.'] -Line 46: Unexpected errors ['generics_defaults_referential.py:46:11 Undefined or invalid type [11]: Annotation `S1` is not defined as a type.', 'generics_defaults_referential.py:46:11 Undefined or invalid type [11]: Annotation `S2` is not defined as a type.'] -Line 87: Unexpected errors ['generics_defaults_referential.py:87:47 Undefined attribute [16]: `list` has no attribute `__getitem__`.'] -Line 90: Unexpected errors ['generics_defaults_referential.py:90:10 Undefined or invalid type [11]: Annotation `ListDefaultT` is not defined as a type.', 'generics_defaults_referential.py:90:10 Undefined or invalid type [11]: Annotation `Z1` is not defined as a type.'] -Line 94: Unexpected errors ['generics_defaults_referential.py:94:0 Assert type [70]: Expected `Type[Bar[]]` but got `Type[Bar]`.', 'generics_defaults_referential.py:94:17 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 95: Unexpected errors ['generics_defaults_referential.py:95:0 Assert type [70]: Expected `Type[Bar[]]` but got `typing.Any`.', 'generics_defaults_referential.py:95:12 Undefined attribute [16]: `Bar` has no attribute `__getitem__`.', 'generics_defaults_referential.py:95:22 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 96: Unexpected errors ['generics_defaults_referential.py:96:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`.', 'generics_defaults_referential.py:96:29 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 97: Unexpected errors ['generics_defaults_referential.py:97:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`.', 'generics_defaults_referential.py:97:40 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 98: Unexpected errors ['generics_defaults_referential.py:98:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`.', 'generics_defaults_referential.py:98:34 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -""" diff --git a/conformance/results/pyre/generics_defaults_specialization.toml b/conformance/results/pyre/generics_defaults_specialization.toml deleted file mode 100644 index 91acb349..00000000 --- a/conformance/results/pyre/generics_defaults_specialization.toml +++ /dev/null @@ -1,45 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support generic defaults. -""" -output = """ -generics_defaults_specialization.py:19:30 Undefined or invalid type [11]: Annotation `T1` is not defined as a type. -generics_defaults_specialization.py:19:30 Undefined or invalid type [11]: Annotation `T2` is not defined as a type. -generics_defaults_specialization.py:22:21 Undefined attribute [16]: `SomethingWithNoDefaults` has no attribute `__getitem__`. -generics_defaults_specialization.py:25:14 Undefined or invalid type [11]: Annotation `MyAlias` is not defined as a type. -generics_defaults_specialization.py:26:4 Assert type [70]: Expected `SomethingWithNoDefaults[]` but got `unknown`. -generics_defaults_specialization.py:26:20 Invalid type parameters [24]: Non-generic type `SomethingWithNoDefaults` cannot take parameters. -generics_defaults_specialization.py:27:4 Assert type [70]: Expected `SomethingWithNoDefaults[]` but got `unknown`. -generics_defaults_specialization.py:27:20 Invalid type parameters [24]: Non-generic type `SomethingWithNoDefaults` cannot take parameters. -generics_defaults_specialization.py:30:0 Undefined attribute [16]: `TypeAlias` has no attribute `__getitem__`. -generics_defaults_specialization.py:38:17 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type. -generics_defaults_specialization.py:45:0 Assert type [70]: Expected `Type[Bar[]]` but got `Type[Bar]`. -generics_defaults_specialization.py:45:17 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_specialization.py:46:0 Assert type [70]: Expected `Bar[]` but got `Bar`. -generics_defaults_specialization.py:46:19 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_specialization.py:47:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`. -generics_defaults_specialization.py:47:12 Undefined attribute [16]: `Bar` has no attribute `__getitem__`. -generics_defaults_specialization.py:47:25 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters. -generics_defaults_specialization.py:50:10 Invalid type parameters [24]: Non-generic type `SubclassMe` cannot take parameters. -generics_defaults_specialization.py:53:0 Assert type [70]: Expected `str` but got `unknown`. -generics_defaults_specialization.py:55:0 Undefined attribute [16]: `Foo` has no attribute `__getitem__`. -generics_defaults_specialization.py:58:10 Undefined or invalid type [11]: Annotation `DefaultIntT` is not defined as a type. -generics_defaults_specialization.py:65:0 Incompatible variable type [9]: v1 is declared to have type `Baz[]` but is used as type `Spam`. -generics_defaults_specialization.py:65:4 Invalid type parameters [24]: Non-generic type `Baz` cannot take parameters. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 19: Unexpected errors ['generics_defaults_specialization.py:19:30 Undefined or invalid type [11]: Annotation `T1` is not defined as a type.', 'generics_defaults_specialization.py:19:30 Undefined or invalid type [11]: Annotation `T2` is not defined as a type.'] -Line 22: Unexpected errors ['generics_defaults_specialization.py:22:21 Undefined attribute [16]: `SomethingWithNoDefaults` has no attribute `__getitem__`.'] -Line 25: Unexpected errors ['generics_defaults_specialization.py:25:14 Undefined or invalid type [11]: Annotation `MyAlias` is not defined as a type.'] -Line 26: Unexpected errors ['generics_defaults_specialization.py:26:4 Assert type [70]: Expected `SomethingWithNoDefaults[]` but got `unknown`.', 'generics_defaults_specialization.py:26:20 Invalid type parameters [24]: Non-generic type `SomethingWithNoDefaults` cannot take parameters.'] -Line 27: Unexpected errors ['generics_defaults_specialization.py:27:4 Assert type [70]: Expected `SomethingWithNoDefaults[]` but got `unknown`.', 'generics_defaults_specialization.py:27:20 Invalid type parameters [24]: Non-generic type `SomethingWithNoDefaults` cannot take parameters.'] -Line 38: Unexpected errors ['generics_defaults_specialization.py:38:17 Undefined or invalid type [11]: Annotation `DefaultStrT` is not defined as a type.'] -Line 45: Unexpected errors ['generics_defaults_specialization.py:45:0 Assert type [70]: Expected `Type[Bar[]]` but got `Type[Bar]`.', 'generics_defaults_specialization.py:45:17 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 46: Unexpected errors ['generics_defaults_specialization.py:46:0 Assert type [70]: Expected `Bar[]` but got `Bar`.', 'generics_defaults_specialization.py:46:19 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 47: Unexpected errors ['generics_defaults_specialization.py:47:0 Assert type [70]: Expected `Bar[]` but got `typing.Any`.', 'generics_defaults_specialization.py:47:12 Undefined attribute [16]: `Bar` has no attribute `__getitem__`.', 'generics_defaults_specialization.py:47:25 Invalid type parameters [24]: Non-generic type `Bar` cannot take parameters.'] -Line 50: Unexpected errors ['generics_defaults_specialization.py:50:10 Invalid type parameters [24]: Non-generic type `SubclassMe` cannot take parameters.'] -Line 53: Unexpected errors ['generics_defaults_specialization.py:53:0 Assert type [70]: Expected `str` but got `unknown`.'] -Line 58: Unexpected errors ['generics_defaults_specialization.py:58:10 Undefined or invalid type [11]: Annotation `DefaultIntT` is not defined as a type.'] -Line 65: Unexpected errors ['generics_defaults_specialization.py:65:0 Incompatible variable type [9]: v1 is declared to have type `Baz[]` but is used as type `Spam`.', 'generics_defaults_specialization.py:65:4 Invalid type parameters [24]: Non-generic type `Baz` cannot take parameters.'] -""" diff --git a/conformance/results/pyre/generics_paramspec_basic.toml b/conformance/results/pyre/generics_paramspec_basic.toml deleted file mode 100644 index 74f97773..00000000 --- a/conformance/results/pyre/generics_paramspec_basic.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Partial" -notes = """ -Does not enforce name consistency for ParamSpec assigned to identifier. -Incorrectly reports error for legitimate use of ParamSpec in generic type alias. -Does not reject ParamSpec when used in various invalid locations. -""" -output = """ -generics_paramspec_basic.py:15:0 Undefined or invalid type [11]: Annotation `P` is not defined as a type. -generics_paramspec_basic.py:17:0 Incompatible variable type [9]: TA2 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`. -generics_paramspec_basic.py:17:26 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]`. -generics_paramspec_basic.py:18:0 Incompatible variable type [9]: TA3 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`. -generics_paramspec_basic.py:18:26 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[object, None]`. -generics_paramspec_basic.py:27:13 Invalid type variable [34]: The type variable `P` isn't present in the function's parameters. -generics_paramspec_basic.py:27:13 Undefined or invalid type [11]: Annotation `Concatenate` is not defined as a type. -generics_paramspec_basic.py:31:13 Invalid type parameters [24]: Single type parameter `Variable[_T]` expected, but a callable parameters `generics_paramspec_basic.P` was given for generic type list. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 10: Expected 1 errors -Line 23: Expected 1 errors -Line 35: Expected 1 errors -Line 39: Expected 1 errors -Line 17: Unexpected errors ['generics_paramspec_basic.py:17:0 Incompatible variable type [9]: TA2 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'generics_paramspec_basic.py:17:26 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]`.'] -Line 18: Unexpected errors ['generics_paramspec_basic.py:18:0 Incompatible variable type [9]: TA3 is declared to have type `TypeAlias` but is used as type `Type[typing.Callable[..., Variable[$synthetic_attribute_resolution_variable]]]`.', 'generics_paramspec_basic.py:18:26 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[object, None]`.'] -""" diff --git a/conformance/results/pyre/generics_paramspec_components.toml b/conformance/results/pyre/generics_paramspec_components.toml deleted file mode 100644 index 76e8a8c2..00000000 --- a/conformance/results/pyre/generics_paramspec_components.toml +++ /dev/null @@ -1,32 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report illegal use of "P.args" on normal parameter. -Does not report error when P.args is specified but P.kwargs is missing. -Does not report error when P is out of scope and P.args and P.kwargs is used. -Does not report error when calling callback defined with ParamSpec with incorrect arguments. -Does not report error when keyword argument is specified between P.args and P.kwargs. -Does not report error when calling callable and argument is missing for concatenated parameters. -""" -output = """ -generics_paramspec_components.py:17:24 Undefined or invalid type [11]: Annotation `P.kwargs` is not defined as a type. -generics_paramspec_components.py:17:44 Undefined or invalid type [11]: Annotation `P.args` is not defined as a type. -generics_paramspec_components.py:49:8 Call error [29]: `typing.Callable[generics_paramspec_components.P, int]` cannot be safely called because the types and kinds of its parameters depend on a type variable. -generics_paramspec_components.py:70:8 Call error [29]: `typing.Callable[typing.Concatenate[int, generics_paramspec_components.P], int]` cannot be safely called because the types and kinds of its parameters depend on a type variable. -generics_paramspec_components.py:72:8 Missing argument [20]: PositionalOnly call expects argument in position 0. -generics_paramspec_components.py:83:8 Unexpected keyword [28]: Unexpected keyword argument `x` to call `outer.foo`. -generics_paramspec_components.py:98:19 Incompatible parameter type [6]: In call `twice`, for 2nd positional argument, expected `int` but got `str`. -generics_paramspec_components.py:98:24 Incompatible parameter type [6]: In call `twice`, for 3rd positional argument, expected `str` but got `int`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 20: Expected 1 errors -Line 23: Expected 1 errors -Line 26: Expected 1 errors -Line 30: Expected 1 errors -Line 35: Expected 1 errors -Line 36: Expected 1 errors -Line 38: Expected 1 errors -Line 41: Expected 1 errors -Line 51: Expected 1 errors -Line 60: Expected 1 errors -""" diff --git a/conformance/results/pyre/generics_paramspec_semantics.toml b/conformance/results/pyre/generics_paramspec_semantics.toml deleted file mode 100644 index 85121218..00000000 --- a/conformance/results/pyre/generics_paramspec_semantics.toml +++ /dev/null @@ -1,16 +0,0 @@ -conformant = "Pass" -output = """ -generics_paramspec_semantics.py:26:0 Unexpected keyword [28]: Unexpected keyword argument `a` to anonymous call. -generics_paramspec_semantics.py:27:8 Incompatible parameter type [6]: In anonymous call, for 2nd positional argument, expected `bool` but got `str`. -generics_paramspec_semantics.py:46:16 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `typing.Callable[generics_paramspec_semantics.P, int]` but got `typing.Callable(y_x)[[Named(y, int), Named(x, str)], int]`. -generics_paramspec_semantics.py:61:22 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `typing.Callable[generics_paramspec_semantics.P, int]` but got `typing.Callable(keyword_only_y)[[KeywordOnly(y, int)], int]`. -generics_paramspec_semantics.py:98:3 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `str` but got `int`. -generics_paramspec_semantics.py:108:3 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `bool` but got `int`. -generics_paramspec_semantics.py:120:3 Incompatible parameter type [6]: In anonymous call, for 1st positional argument, expected `str` but got `int`. -generics_paramspec_semantics.py:127:1 Invalid decoration [56]: Pyre doesn't yet support decorators with ParamSpec applied to generic functions. Consider using a context manager instead of a decorator, if possible. -generics_paramspec_semantics.py:132:1 Invalid decoration [56]: Pyre doesn't yet support decorators with ParamSpec applied to generic functions. Consider using a context manager instead of a decorator, if possible. -generics_paramspec_semantics.py:137:1 Invalid decoration [56]: Pyre doesn't yet support decorators with ParamSpec applied to generic functions. Consider using a context manager instead of a decorator, if possible. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/generics_paramspec_specialization.toml b/conformance/results/pyre/generics_paramspec_specialization.toml deleted file mode 100644 index d4da441a..00000000 --- a/conformance/results/pyre/generics_paramspec_specialization.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Partial" -notes = """ -Reports error for legitimate use of `...` to specialize ParamSpec -""" -output = """ -generics_paramspec_specialization.py:44:14 Invalid type parameters [24]: Callable parameters expected for parameter specification `P1`, but a single type `int` was given for generic type ClassA. -generics_paramspec_specialization.py:53:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -generics_paramspec_specialization.py:54:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -generics_paramspec_specialization.py:55:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -generics_paramspec_specialization.py:59:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -generics_paramspec_specialization.py:60:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -generics_paramspec_specialization.py:61:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 53: Unexpected errors ['generics_paramspec_specialization.py:53:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.'] -Line 59: Unexpected errors ['generics_paramspec_specialization.py:59:4 Too many arguments [19]: PositionalOnly call expects 2 positional arguments, 3 were provided.'] -""" diff --git a/conformance/results/pyre/generics_scoping.toml b/conformance/results/pyre/generics_scoping.toml deleted file mode 100644 index e91ac08b..00000000 --- a/conformance/results/pyre/generics_scoping.toml +++ /dev/null @@ -1,29 +0,0 @@ -conformant = "Partial" -notes = """ -False negative on generic class nested within generic function with same type variable. -False negative on generic class nested within generic class with same type variable. -False negative on assert_type uses. -""" -output = """ -generics_scoping.py:14:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[1]`. -generics_scoping.py:15:0 Assert type [70]: Expected `str` but got `typing_extensions.Literal['a']`. -generics_scoping.py:29:9 Incompatible parameter type [6]: In call `MyClass.meth_2`, for 1st positional argument, expected `int` but got `str`. -generics_scoping.py:42:0 Assert type [70]: Expected `str` but got `typing_extensions.Literal['abc']`. -generics_scoping.py:43:0 Assert type [70]: Expected `bytes` but got `typing_extensions.Literal[b'abc']`. -generics_scoping.py:50:7 Invalid type variable [34]: The type variable `Variable[S]` isn't present in the function's parameters. -generics_scoping.py:54:13 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[S]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[S]`. -generics_scoping.py:78:11 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`. -generics_scoping.py:87:4 Incompatible attribute type [8]: Attribute `alias` declared in class `Outer` has type `TypeAlias` but is used as type `Type[List[Variable[T]]]`. -generics_scoping.py:94:13 Invalid type variable [34]: The type variable `Variable[T]` can only be used to annotate generic classes or functions. -generics_scoping.py:95:13 Invalid type variable [34]: The type variable `Variable[T]` can only be used to annotate generic classes or functions. -generics_scoping.py:96:0 Undefined attribute [16]: `list` has no attribute `__getitem__`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 65: Expected 1 errors -Line 75: Expected 1 errors -Line 14: Unexpected errors ['generics_scoping.py:14:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[1]`.'] -Line 15: Unexpected errors ["generics_scoping.py:15:0 Assert type [70]: Expected `str` but got `typing_extensions.Literal['a']`."] -Line 42: Unexpected errors ["generics_scoping.py:42:0 Assert type [70]: Expected `str` but got `typing_extensions.Literal['abc']`."] -Line 43: Unexpected errors ["generics_scoping.py:43:0 Assert type [70]: Expected `bytes` but got `typing_extensions.Literal[b'abc']`."] -""" diff --git a/conformance/results/pyre/generics_self_advanced.toml b/conformance/results/pyre/generics_self_advanced.toml deleted file mode 100644 index f298efb4..00000000 --- a/conformance/results/pyre/generics_self_advanced.toml +++ /dev/null @@ -1,24 +0,0 @@ -conformant = "Partial" -notes = """ -Does not handle use of `Self` within class body correctly. -False negatives on assert_type uses. -""" -output = """ -generics_self_advanced.py:25:7 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. -generics_self_advanced.py:35:8 Assert type [70]: Expected `unknown` but got `ChildB`. -generics_self_advanced.py:37:8 Assert type [70]: Expected `unknown` but got `typing.Any`. -generics_self_advanced.py:38:8 Assert type [70]: Expected `unknown` but got `ChildB`. -generics_self_advanced.py:42:8 Assert type [70]: Expected `unknown` but got `Type[ChildB]`. -generics_self_advanced.py:44:8 Assert type [70]: Expected `unknown` but got `typing.Any`. -generics_self_advanced.py:45:8 Assert type [70]: Expected `unknown` but got `ChildB`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 25: Unexpected errors ['generics_self_advanced.py:25:7 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] -Line 35: Unexpected errors ['generics_self_advanced.py:35:8 Assert type [70]: Expected `unknown` but got `ChildB`.'] -Line 37: Unexpected errors ['generics_self_advanced.py:37:8 Assert type [70]: Expected `unknown` but got `typing.Any`.'] -Line 38: Unexpected errors ['generics_self_advanced.py:38:8 Assert type [70]: Expected `unknown` but got `ChildB`.'] -Line 42: Unexpected errors ['generics_self_advanced.py:42:8 Assert type [70]: Expected `unknown` but got `Type[ChildB]`.'] -Line 44: Unexpected errors ['generics_self_advanced.py:44:8 Assert type [70]: Expected `unknown` but got `typing.Any`.'] -Line 45: Unexpected errors ['generics_self_advanced.py:45:8 Assert type [70]: Expected `unknown` but got `ChildB`.'] -""" diff --git a/conformance/results/pyre/generics_self_attributes.toml b/conformance/results/pyre/generics_self_attributes.toml deleted file mode 100644 index 557fadbf..00000000 --- a/conformance/results/pyre/generics_self_attributes.toml +++ /dev/null @@ -1,15 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not understand `Self` type. -""" -output = """ -generics_self_attributes.py:16:10 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. -generics_self_attributes.py:26:5 Unexpected keyword [28]: Unexpected keyword argument `next` to call `OrdinalLinkedList.__init__`. -generics_self_attributes.py:29:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `OrdinalLinkedList.__init__`. -generics_self_attributes.py:32:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `LinkedList.__init__`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 16: Unexpected errors ['generics_self_attributes.py:16:10 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] -Line 29: Unexpected errors ['generics_self_attributes.py:29:14 Unexpected keyword [28]: Unexpected keyword argument `next` to call `OrdinalLinkedList.__init__`.'] -""" diff --git a/conformance/results/pyre/generics_self_basic.toml b/conformance/results/pyre/generics_self_basic.toml deleted file mode 100644 index db088609..00000000 --- a/conformance/results/pyre/generics_self_basic.toml +++ /dev/null @@ -1,19 +0,0 @@ -conformant = "Partial" -notes = """ -Does not handle use of `Self` as a generic type. -""" -output = """ -generics_self_basic.py:14:8 Assert type [70]: Expected `unknown` but got `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]`. -generics_self_basic.py:14:26 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. -generics_self_basic.py:20:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`. -generics_self_basic.py:27:8 Assert type [70]: Expected `unknown` but got `Type[Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]]`. -generics_self_basic.py:33:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]` but got `Shape`. -generics_self_basic.py:40:8 Assert type [70]: Expected `unknown` but got `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]`. -generics_self_basic.py:67:25 Invalid type parameters [24]: Non-generic type `_Self_generics_self_basic_Container__` cannot take parameters. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 14: Unexpected errors ['generics_self_basic.py:14:8 Assert type [70]: Expected `unknown` but got `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]`.', 'generics_self_basic.py:14:26 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] -Line 27: Unexpected errors ['generics_self_basic.py:27:8 Assert type [70]: Expected `unknown` but got `Type[Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]]`.'] -Line 40: Unexpected errors ['generics_self_basic.py:40:8 Assert type [70]: Expected `unknown` but got `Variable[_Self_generics_self_basic_Shape__ (bound to Shape)]`.'] -""" diff --git a/conformance/results/pyre/generics_self_protocols.toml b/conformance/results/pyre/generics_self_protocols.toml deleted file mode 100644 index 309def8b..00000000 --- a/conformance/results/pyre/generics_self_protocols.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject protocol compatibility due to method `Self` return type. -""" -output = """ -generics_self_protocols.py:61:18 Incompatible parameter type [6]: In call `accepts_shape`, for 1st positional argument, expected `ShapeProtocol` but got `BadReturnType`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 64: Expected 1 errors -""" diff --git a/conformance/results/pyre/generics_self_usage.toml b/conformance/results/pyre/generics_self_usage.toml deleted file mode 100644 index 8907b5e7..00000000 --- a/conformance/results/pyre/generics_self_usage.toml +++ /dev/null @@ -1,28 +0,0 @@ -conformant = "Partial" -notes = """ -Complains in some cases when `self: Self` is used explicitly. -Does not complain when `Self` is used on a function outside any class definition. -Does not complain when `self` is annotated explicitly (without `Self`) and `Self` is returned. -Does not complain on inheritance involving `Self`. -Does not complain on use of `Self` in static methods. -Does not complain on use of `Self` in metaclasses. -""" -output = """ -generics_self_usage.py:20:34 Undefined or invalid type [11]: Annotation `Self` is not defined as a type. -generics_self_usage.py:86:8 Incompatible return type [7]: Expected `Variable[_Self_generics_self_usage_Foo3__ (bound to Foo3)]` but got `Foo3`. -generics_self_usage.py:106:23 Undefined attribute [16]: `tuple` has no attribute `__getitem__`. -generics_self_usage.py:106:29 Undefined attribute [16]: Module `typing` has no attribute `Self`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 73: Expected 1 errors -Line 76: Expected 1 errors -Line 82: Expected 1 errors -Line 101: Expected 1 errors -Line 103: Expected 1 errors -Line 111: Expected 1 errors -Line 116: Expected 1 errors -Line 121: Expected 1 errors -Line 125: Expected 1 errors -Line 20: Unexpected errors ['generics_self_usage.py:20:34 Undefined or invalid type [11]: Annotation `Self` is not defined as a type.'] -""" diff --git a/conformance/results/pyre/generics_syntax_compatibility.toml b/conformance/results/pyre/generics_syntax_compatibility.toml deleted file mode 100644 index 71877e3c..00000000 --- a/conformance/results/pyre/generics_syntax_compatibility.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Partial" -notes = """ -False negative on mixing legacy and PEP695 syntax. -Does not detect mixing legacy and PEP695 syntax in methods. -""" -output = """ -generics_syntax_compatibility.py:14:16 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[K]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[K]`. -generics_syntax_compatibility.py:18:19 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[K]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[K]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 26: Expected 1 errors -Line 18: Unexpected errors ["generics_syntax_compatibility.py:18:19 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[K]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[K]`."] -""" diff --git a/conformance/results/pyre/generics_syntax_declarations.toml b/conformance/results/pyre/generics_syntax_declarations.toml deleted file mode 100644 index a97c785e..00000000 --- a/conformance/results/pyre/generics_syntax_declarations.toml +++ /dev/null @@ -1,20 +0,0 @@ -conformant = "Partial" -notes = """ -Does not detect incorrect use of legacy style syntax mixed with PEP695 syntax. -False negatives due to assert_type use. -""" -output = """ -generics_syntax_declarations.py:32:8 Undefined attribute [16]: `Variable[T (bound to str)]` has no attribute `is_integer`. -generics_syntax_declarations.py:44:20 Invalid bound [75]: `dict[(str, V)]` is not valid bound. -generics_syntax_declarations.py:48:16 Invalid bound [75]: `[str, int]` is not valid bound. -generics_syntax_declarations.py:60:16 Invalid bound [75]: `()` is not valid bound. -generics_syntax_declarations.py:64:16 Invalid bound [75]: `(str)` is not valid bound. -generics_syntax_declarations.py:71:16 Invalid bound [75]: `$local_generics_syntax_declarations$t1` is not valid bound. -generics_syntax_declarations.py:75:16 Invalid bound [75]: `(3, bytes)` is not valid bound. -generics_syntax_declarations.py:79:16 Invalid bound [75]: `(list[S], str)` is not valid bound. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 17: Expected 1 errors -Line 25: Expected 1 errors -""" diff --git a/conformance/results/pyre/generics_syntax_infer_variance.toml b/conformance/results/pyre/generics_syntax_infer_variance.toml deleted file mode 100644 index 6339780b..00000000 --- a/conformance/results/pyre/generics_syntax_infer_variance.toml +++ /dev/null @@ -1,30 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly determines that a class cannot be instantiated with __getitem__. -Incorrectly handles mixing legacy and PEP695 syntax. -""" -output = """ -generics_syntax_infer_variance.py:15:0 Invalid variance definition [77]: Cannot use infer_variance with predefined variance. -generics_syntax_infer_variance.py:17:0 Invalid variance definition [77]: Cannot use infer_variance with predefined variance. -generics_syntax_infer_variance.py:29:0 Incompatible variable type [9]: vco1_2 is declared to have type `ShouldBeCovariant1[int]` but is used as type `ShouldBeCovariant1[float]`. -generics_syntax_infer_variance.py:47:0 Incompatible variable type [9]: vco2_2 is declared to have type `ShouldBeCovariant2[int]` but is used as type `ShouldBeCovariant2[float]`. -generics_syntax_infer_variance.py:56:0 Incompatible variable type [9]: vco3_2 is declared to have type `ShouldBeCovariant3[int]` but is used as type `ShouldBeCovariant3[float]`. -generics_syntax_infer_variance.py:85:0 Incompatible variable type [9]: vo5_2 is declared to have type `ShouldBeCovariant5[int]` but is used as type `ShouldBeCovariant5[float]`. -generics_syntax_infer_variance.py:96:0 Incompatible variable type [9]: vo6_2 is declared to have type `ShouldBeCovariant6[int]` but is used as type `ShouldBeCovariant6[float]`. -generics_syntax_infer_variance.py:112:0 Incompatible variable type [9]: vinv1_1 is declared to have type `ShouldBeInvariant1[float]` but is used as type `ShouldBeInvariant1[int]`. -generics_syntax_infer_variance.py:113:0 Incompatible variable type [9]: vinv1_2 is declared to have type `ShouldBeInvariant1[int]` but is used as type `ShouldBeInvariant1[float]`. -generics_syntax_infer_variance.py:127:0 Incompatible variable type [9]: vinv2_1 is declared to have type `ShouldBeInvariant2[float]` but is used as type `ShouldBeInvariant2[int]`. -generics_syntax_infer_variance.py:128:0 Incompatible variable type [9]: vinv2_2 is declared to have type `ShouldBeInvariant2[int]` but is used as type `ShouldBeInvariant2[float]`. -generics_syntax_infer_variance.py:135:0 Incompatible variable type [9]: vinv3_1 is declared to have type `ShouldBeInvariant3[float, str]` but is used as type `ShouldBeInvariant3[int, str]`. -generics_syntax_infer_variance.py:136:0 Incompatible variable type [9]: vinv3_2 is declared to have type `ShouldBeInvariant3[int, str]` but is used as type `ShouldBeInvariant3[float, str]`. -generics_syntax_infer_variance.py:137:0 Incompatible variable type [9]: vinv3_3 is declared to have type `ShouldBeInvariant3[str, float]` but is used as type `ShouldBeInvariant3[str, int]`. -generics_syntax_infer_variance.py:138:0 Incompatible variable type [9]: vinv3_4 is declared to have type `ShouldBeInvariant3[str, int]` but is used as type `ShouldBeInvariant3[str, float]`. -generics_syntax_infer_variance.py:143:7 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`. -generics_syntax_infer_variance.py:165:0 Incompatible variable type [9]: vcontra1_1 is declared to have type `ShouldBeContravariant1[float]` but is used as type `ShouldBeContravariant1[int]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 146: Expected 1 errors -Line 154: Expected 1 errors -Line 143: Unexpected errors ["generics_syntax_infer_variance.py:143:7 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`."] -""" diff --git a/conformance/results/pyre/generics_syntax_scoping.toml b/conformance/results/pyre/generics_syntax_scoping.toml deleted file mode 100644 index 4ac894c8..00000000 --- a/conformance/results/pyre/generics_syntax_scoping.toml +++ /dev/null @@ -1,20 +0,0 @@ -conformant = "Partial" -notes = """ -Does not properly handle mixing legacy syntax with PEP695 syntax. -""" -output = """ -generics_syntax_scoping.py:14:19 Invalid bound [75]: `typing.Sequence[$local_generics_syntax_scoping$S]` is not valid bound. -generics_syntax_scoping.py:18:16 Invalid bound [75]: `typing.Sequence[$local_generics_syntax_scoping$T]` is not valid bound. -generics_syntax_scoping.py:27:38 Undefined or invalid type [11]: Annotation `T` is not defined as a type. -generics_syntax_scoping.py:31:41 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `int`. -generics_syntax_scoping.py:98:28 Undefined or invalid type [11]: Annotation `ClassE.T` is not defined as a type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 35: Expected 1 errors -Line 44: Expected 1 errors -Line 92: Expected 1 errors -Line 95: Expected 1 errors -Line 27: Unexpected errors ['generics_syntax_scoping.py:27:38 Undefined or invalid type [11]: Annotation `T` is not defined as a type.'] -Line 31: Unexpected errors ['generics_syntax_scoping.py:31:41 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[T]]` but got `int`.'] -""" diff --git a/conformance/results/pyre/generics_type_erasure.toml b/conformance/results/pyre/generics_type_erasure.toml deleted file mode 100644 index af4f56c4..00000000 --- a/conformance/results/pyre/generics_type_erasure.toml +++ /dev/null @@ -1,29 +0,0 @@ -conformant = "Partial" -notes = """ -Does not erase unspecified type variables to `Any` prior to `assert_type` handling. -False negatives on instance attribute access on the type. -Does not infer type of `DefaultDict` with explicit type parameters on constructor. -False negatives on assert_type uses. -""" -output = """ -generics_type_erasure.py:17:0 Assert type [70]: Expected `Node[str]` but got `Node[typing_extensions.Literal['']]`. -generics_type_erasure.py:18:0 Assert type [70]: Expected `Node[int]` but got `Node[typing_extensions.Literal[0]]`. -generics_type_erasure.py:19:0 Assert type [70]: Expected `Node[typing.Any]` but got `Node[Variable[T]]`. -generics_type_erasure.py:21:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`. -generics_type_erasure.py:38:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[int]` but got `str`. -generics_type_erasure.py:40:15 Incompatible parameter type [6]: In call `Node.__init__`, for 1st positional argument, expected `Optional[str]` but got `int`. -generics_type_erasure.py:56:0 Assert type [70]: Expected `bytes` but got `typing.Any`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 42: Expected 1 errors -Line 43: Expected 1 errors -Line 44: Expected 1 errors -Line 45: Expected 1 errors -Line 46: Expected 1 errors -Line 17: Unexpected errors ["generics_type_erasure.py:17:0 Assert type [70]: Expected `Node[str]` but got `Node[typing_extensions.Literal['']]`."] -Line 18: Unexpected errors ['generics_type_erasure.py:18:0 Assert type [70]: Expected `Node[int]` but got `Node[typing_extensions.Literal[0]]`.'] -Line 19: Unexpected errors ['generics_type_erasure.py:19:0 Assert type [70]: Expected `Node[typing.Any]` but got `Node[Variable[T]]`.'] -Line 21: Unexpected errors ['generics_type_erasure.py:21:0 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.'] -Line 56: Unexpected errors ['generics_type_erasure.py:56:0 Assert type [70]: Expected `bytes` but got `typing.Any`.'] -""" diff --git a/conformance/results/pyre/generics_typevartuple_args.toml b/conformance/results/pyre/generics_typevartuple_args.toml deleted file mode 100644 index 7f48df0c..00000000 --- a/conformance/results/pyre/generics_typevartuple_args.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Partial" -notes = """ -Does not property handle TypeVarTuple. -""" -output = """ -generics_typevartuple_args.py:20:0 Assert type [70]: Expected `Tuple[int, str]` but got `Tuple[typing_extensions.Literal[1], typing_extensions.Literal['a']]`. -generics_typevartuple_args.py:32:0 Assert type [70]: Expected `Tuple[int, str]` but got `Tuple[typing_extensions.Literal[0], typing_extensions.Literal['']]`. -generics_typevartuple_args.py:33:0 Invalid argument [32]: Argument types `typing_extensions.Literal[0], typing_extensions.Literal['']` are not compatible with expected variadic elements `*generics_typevartuple_args.Ts, generics_typevartuple_args.Env`. -generics_typevartuple_args.py:34:0 Invalid argument [32]: Argument types `typing_extensions.Literal[0], typing_extensions.Literal['']` are not compatible with expected variadic elements `*generics_typevartuple_args.Ts, generics_typevartuple_args.Env`. -generics_typevartuple_args.py:48:9 Incompatible parameter type [6]: In call `func1`, for 2nd positional argument, expected `int` but got `str`. -generics_typevartuple_args.py:57:0 Invalid argument [32]: Argument types `typing_extensions.Literal[1], typing_extensions.Literal[1], typing_extensions.Literal['']` are not compatible with expected variadic elements `int, *Tuple[str, ...], str`. -generics_typevartuple_args.py:58:0 Invalid argument [32]: Argument types `typing_extensions.Literal[1]` are not compatible with expected variadic elements `int, *Tuple[str, ...], str`. -generics_typevartuple_args.py:59:0 Invalid argument [32]: Argument types `typing_extensions.Literal['']` are not compatible with expected variadic elements `int, *Tuple[str, ...], str`. -generics_typevartuple_args.py:66:6 Incompatible parameter type [6]: In call `func3`, for 1st positional argument, expected `Unpack[Tuple[int, str]]` but got `int`. -generics_typevartuple_args.py:66:9 Incompatible parameter type [6]: In call `func3`, for 2nd positional argument, expected `Unpack[Tuple[int, str]]` but got `str`. -generics_typevartuple_args.py:67:6 Incompatible parameter type [6]: In call `func3`, for 1st positional argument, expected `Unpack[Tuple[int, str]]` but got `int`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 75: Expected 1 errors -Line 76: Expected 1 errors -Line 20: Unexpected errors ["generics_typevartuple_args.py:20:0 Assert type [70]: Expected `Tuple[int, str]` but got `Tuple[typing_extensions.Literal[1], typing_extensions.Literal['a']]`."] -Line 32: Unexpected errors ["generics_typevartuple_args.py:32:0 Assert type [70]: Expected `Tuple[int, str]` but got `Tuple[typing_extensions.Literal[0], typing_extensions.Literal['']]`."] -Line 66: Unexpected errors ['generics_typevartuple_args.py:66:6 Incompatible parameter type [6]: In call `func3`, for 1st positional argument, expected `Unpack[Tuple[int, str]]` but got `int`.', 'generics_typevartuple_args.py:66:9 Incompatible parameter type [6]: In call `func3`, for 2nd positional argument, expected `Unpack[Tuple[int, str]]` but got `str`.'] -""" diff --git a/conformance/results/pyre/generics_typevartuple_basic.toml b/conformance/results/pyre/generics_typevartuple_basic.toml deleted file mode 100644 index 6b3fded1..00000000 --- a/conformance/results/pyre/generics_typevartuple_basic.toml +++ /dev/null @@ -1,33 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support TypeVarTuple. -False negatives due to assert_type. -""" -output = """ -generics_typevartuple_basic.py:42:33 Incompatible parameter type [6]: In call `Array.__init__`, for 1st positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Shape]` but got `Height`. -generics_typevartuple_basic.py:43:0 Incompatible variable type [9]: v5 is declared to have type `Array[Batch, Height, Width]` but is used as type `Array[Batch, Width]`. -generics_typevartuple_basic.py:44:0 Incompatible variable type [9]: v6 is declared to have type `Array[Time, Batch, Height, Width]` but is used as type `Array[Time, Batch, Width, Height]`. -generics_typevartuple_basic.py:52:13 Undefined or invalid type [11]: Annotation `Shape` is not defined as a type. -generics_typevartuple_basic.py:54:21 Invalid type variable [34]: The type variable `Shape` isn't present in the function's parameters. -generics_typevartuple_basic.py:65:6 Unexpected keyword [28]: Unexpected keyword argument `covariant` to call `TypeVarTuple.__init__`. -generics_typevartuple_basic.py:66:6 Too many arguments [19]: Call `TypeVarTuple.__init__` expects 1 positional argument, 3 were provided. -generics_typevartuple_basic.py:67:6 Unexpected keyword [28]: Unexpected keyword argument `bound` to call `TypeVarTuple.__init__`. -generics_typevartuple_basic.py:84:0 Assert type [70]: Expected `Tuple[int]` but got `Tuple[typing_extensions.Literal[0]]`. -generics_typevartuple_basic.py:84:24 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Ts]` but got `Tuple[int]`. -generics_typevartuple_basic.py:87:12 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Ts]` but got `Tuple[int]`. -generics_typevartuple_basic.py:89:12 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Ts]` but got `Tuple[str]`. -generics_typevartuple_basic.py:90:14 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Ts]` but got `Tuple[int]`. -generics_typevartuple_basic.py:99:16 Incompatible parameter type [6]: In call `multiply`, for 2nd positional argument, expected `Array[*generics_typevartuple_basic.Shape]` but got `Array[Width]`. -generics_typevartuple_basic.py:100:16 Incompatible parameter type [6]: In call `multiply`, for 2nd positional argument, expected `Array[*generics_typevartuple_basic.Shape]` but got `Array[Height, Width]`. -generics_typevartuple_basic.py:106:13 Undefined or invalid type [11]: Annotation `Ts1` is not defined as a type. -generics_typevartuple_basic.py:106:13 Undefined or invalid type [11]: Annotation `Ts2` is not defined as a type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 53: Expected 1 errors -Line 56: Expected 1 errors -Line 59: Expected 1 errors -Line 54: Unexpected errors ["generics_typevartuple_basic.py:54:21 Invalid type variable [34]: The type variable `Shape` isn't present in the function's parameters."] -Line 84: Unexpected errors ['generics_typevartuple_basic.py:84:0 Assert type [70]: Expected `Tuple[int]` but got `Tuple[typing_extensions.Literal[0]]`.', 'generics_typevartuple_basic.py:84:24 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Ts]` but got `Tuple[int]`.'] -Line 87: Unexpected errors ['generics_typevartuple_basic.py:87:12 Incompatible parameter type [6]: In call `func2`, for 2nd positional argument, expected `typing.Tuple[*generics_typevartuple_basic.Ts]` but got `Tuple[int]`.'] -""" diff --git a/conformance/results/pyre/generics_typevartuple_callable.toml b/conformance/results/pyre/generics_typevartuple_callable.toml deleted file mode 100644 index aa0453d9..00000000 --- a/conformance/results/pyre/generics_typevartuple_callable.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Partial" -notes = """ -False negatives due to assert_type. -""" -output = """ -generics_typevartuple_callable.py:26:8 Incompatible parameter type [6]: In call `Process.__init__`, for argument `target`, expected `typing.Callable[[Variable(*generics_typevartuple_callable.Ts)], None]` but got `typing.Callable(func1)[[Named(arg1, int), Named(arg2, str)], None]`. -generics_typevartuple_callable.py:49:0 Assert type [70]: Expected `Tuple[float, str, complex]` but got `Tuple[float, typing_extensions.Literal[''], complex]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 49: Unexpected errors ["generics_typevartuple_callable.py:49:0 Assert type [70]: Expected `Tuple[float, str, complex]` but got `Tuple[float, typing_extensions.Literal[''], complex]`."] -""" diff --git a/conformance/results/pyre/generics_typevartuple_concat.toml b/conformance/results/pyre/generics_typevartuple_concat.toml deleted file mode 100644 index 3754ffc8..00000000 --- a/conformance/results/pyre/generics_typevartuple_concat.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Partial" -notes = """ -False negatives due to assert_type. -False compatability error message. -""" -output = """ -generics_typevartuple_concat.py:52:0 Assert type [70]: Expected `Tuple[int, bool, str]` but got `Tuple[typing_extensions.Literal[0], typing_extensions.Literal[True], typing_extensions.Literal['a']]`. -generics_typevartuple_concat.py:56:4 Incompatible return type [7]: Expected `typing.Tuple[*generics_typevartuple_concat.Ts, Variable[T]]` but got `typing.Tuple[*Tuple[object, ...], object]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 52: Unexpected errors ["generics_typevartuple_concat.py:52:0 Assert type [70]: Expected `Tuple[int, bool, str]` but got `Tuple[typing_extensions.Literal[0], typing_extensions.Literal[True], typing_extensions.Literal['a']]`."] -Line 56: Unexpected errors ['generics_typevartuple_concat.py:56:4 Incompatible return type [7]: Expected `typing.Tuple[*generics_typevartuple_concat.Ts, Variable[T]]` but got `typing.Tuple[*Tuple[object, ...], object]`.'] -""" diff --git a/conformance/results/pyre/generics_typevartuple_overloads.toml b/conformance/results/pyre/generics_typevartuple_overloads.toml deleted file mode 100644 index 08cb3a92..00000000 --- a/conformance/results/pyre/generics_typevartuple_overloads.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support star expressions for `Unpack`. -""" -output = """ -generics_typevartuple_overloads.py:18:4 Incompatible overload [43]: The implementation of `Array.transpose` does not accept all possible arguments of overload defined on line `18`. -generics_typevartuple_overloads.py:22:4 Incompatible overload [43]: The implementation of `Array.transpose` does not accept all possible arguments of overload defined on line `22`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 18: Unexpected errors ['generics_typevartuple_overloads.py:18:4 Incompatible overload [43]: The implementation of `Array.transpose` does not accept all possible arguments of overload defined on line `18`.'] -Line 22: Unexpected errors ['generics_typevartuple_overloads.py:22:4 Incompatible overload [43]: The implementation of `Array.transpose` does not accept all possible arguments of overload defined on line `22`.'] -""" diff --git a/conformance/results/pyre/generics_typevartuple_specialization.toml b/conformance/results/pyre/generics_typevartuple_specialization.toml deleted file mode 100644 index 0f155d1b..00000000 --- a/conformance/results/pyre/generics_typevartuple_specialization.toml +++ /dev/null @@ -1,35 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not support star expressions for `Unpack`. -""" -output = """ -generics_typevartuple_specialization.py:29:21 Incompatible parameter type [6]: In call `takes_any_array1`, for 1st positional argument, expected `Array[]` but got `Array[Height, Width]`. -generics_typevartuple_specialization.py:34:21 Incompatible parameter type [6]: In call `takes_any_array1`, for 1st positional argument, expected `Array[]` but got `Array[Time, Height, Width]`. -generics_typevartuple_specialization.py:121:0 Invalid type [31]: Expression `tuple[(T1, *Ts, T2, *Ts)]` is not a valid type. -generics_typevartuple_specialization.py:122:0 Invalid type [31]: Expression `tuple[(T1, *Ts, T2, *tuple[(int, ...)])]` is not a valid type. -generics_typevartuple_specialization.py:127:4 Invalid type variable [34]: The type variable `Variable[T1]` can only be used to annotate generic classes or functions. -generics_typevartuple_specialization.py:127:4 Invalid type variable [34]: The type variable `Variable[T2]` can only be used to annotate generic classes or functions. -generics_typevartuple_specialization.py:127:4 Invalid type variable [34]: The type variable `Ts` can only be used to annotate generic classes or functions. -generics_typevartuple_specialization.py:136:4 Assert type [70]: Expected `Tuple[Tuple[str], bool, float]` but got `Tuple[Tuple[float], str, bool]`. -generics_typevartuple_specialization.py:137:4 Assert type [70]: Expected `Tuple[Tuple[str, bool], float, int]` but got `Tuple[Tuple[float, int], str, bool]`. -generics_typevartuple_specialization.py:148:4 Assert type [70]: Expected `Tuple[Tuple[], str, bool, float]` but got `Tuple[Tuple[], float, str, bool]`. -generics_typevartuple_specialization.py:149:4 Assert type [70]: Expected `Tuple[Tuple[bool], str, float, int]` but got `Tuple[Tuple[int], float, str, bool]`. -generics_typevartuple_specialization.py:157:4 Assert type [70]: Expected `typing.Tuple[*Tuple[int, ...], int]` but got `typing.Tuple[*Tuple[typing.Any, ...], typing.Any]`. -generics_typevartuple_specialization.py:158:4 Assert type [70]: Expected `typing.Tuple[*Tuple[int, ...], str]` but got `typing.Tuple[*generics_typevartuple_specialization.Ts, Variable[T1]]`. -generics_typevartuple_specialization.py:159:4 Assert type [70]: Expected `typing.Tuple[*Tuple[int, ...], str]` but got `typing.Tuple[*generics_typevartuple_specialization.Ts, Variable[T1]]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 109: Expected 1 errors -Line 110: Expected 1 errors -Line 163: Expected 1 errors -Line 29: Unexpected errors ['generics_typevartuple_specialization.py:29:21 Incompatible parameter type [6]: In call `takes_any_array1`, for 1st positional argument, expected `Array[]` but got `Array[Height, Width]`.'] -Line 34: Unexpected errors ['generics_typevartuple_specialization.py:34:21 Incompatible parameter type [6]: In call `takes_any_array1`, for 1st positional argument, expected `Array[]` but got `Array[Time, Height, Width]`.'] -Line 136: Unexpected errors ['generics_typevartuple_specialization.py:136:4 Assert type [70]: Expected `Tuple[Tuple[str], bool, float]` but got `Tuple[Tuple[float], str, bool]`.'] -Line 137: Unexpected errors ['generics_typevartuple_specialization.py:137:4 Assert type [70]: Expected `Tuple[Tuple[str, bool], float, int]` but got `Tuple[Tuple[float, int], str, bool]`.'] -Line 148: Unexpected errors ['generics_typevartuple_specialization.py:148:4 Assert type [70]: Expected `Tuple[Tuple[], str, bool, float]` but got `Tuple[Tuple[], float, str, bool]`.'] -Line 149: Unexpected errors ['generics_typevartuple_specialization.py:149:4 Assert type [70]: Expected `Tuple[Tuple[bool], str, float, int]` but got `Tuple[Tuple[int], float, str, bool]`.'] -Line 157: Unexpected errors ['generics_typevartuple_specialization.py:157:4 Assert type [70]: Expected `typing.Tuple[*Tuple[int, ...], int]` but got `typing.Tuple[*Tuple[typing.Any, ...], typing.Any]`.'] -Line 158: Unexpected errors ['generics_typevartuple_specialization.py:158:4 Assert type [70]: Expected `typing.Tuple[*Tuple[int, ...], str]` but got `typing.Tuple[*generics_typevartuple_specialization.Ts, Variable[T1]]`.'] -Line 159: Unexpected errors ['generics_typevartuple_specialization.py:159:4 Assert type [70]: Expected `typing.Tuple[*Tuple[int, ...], str]` but got `typing.Tuple[*generics_typevartuple_specialization.Ts, Variable[T1]]`.'] -""" diff --git a/conformance/results/pyre/generics_typevartuple_unpack.toml b/conformance/results/pyre/generics_typevartuple_unpack.toml deleted file mode 100644 index e71e46e5..00000000 --- a/conformance/results/pyre/generics_typevartuple_unpack.toml +++ /dev/null @@ -1,9 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -generics_typevartuple_unpack.py:30:27 Incompatible parameter type [6]: In call `process_batch_channels`, for 1st positional argument, expected `Array[Batch, *Tuple[typing.Any, ...], Channels]` but got `Array[Batch]`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/generics_upper_bound.toml b/conformance/results/pyre/generics_upper_bound.toml deleted file mode 100644 index 6c88c406..00000000 --- a/conformance/results/pyre/generics_upper_bound.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Partial" -notes = """ -False positives on valid type expression (`list[T]`) in `bound`. -Does not complain when bound is used alongside type constraints. -""" -output = """ -generics_upper_bound.py:51:7 Incompatible parameter type [6]: In call `longer`, for 1st positional argument, expected `Variable[ST (bound to Sized)]` but got `int`. -generics_upper_bound.py:51:10 Incompatible parameter type [6]: In call `longer`, for 2nd positional argument, expected `Variable[ST (bound to Sized)]` but got `int`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 24: Expected 1 errors -Line 56: Expected 1 errors -""" diff --git a/conformance/results/pyre/generics_variance.toml b/conformance/results/pyre/generics_variance.toml deleted file mode 100644 index ee65464e..00000000 --- a/conformance/results/pyre/generics_variance.toml +++ /dev/null @@ -1,23 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject a TypeVar that is defined as both covariant and contravariant. -Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible. -""" -output = """ -generics_variance.py:77: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. -generics_variance.py:81: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. -generics_variance.py:93:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T_co](covariant)` because subclasses cannot use more permissive type variables than their superclasses. -generics_variance.py:105:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T_contra](contravariant)` because subclasses cannot use more permissive type variables than their superclasses. -generics_variance.py:125:0 Invalid type variance [46]: The type variable `Variable[T_co](covariant)` is incompatible with parent class type variable `Variable[T_contra](contravariant)` because subclasses cannot use more permissive type variables than their superclasses. -generics_variance.py:131:0 Invalid type variance [46]: The type variable `Variable[T_contra](contravariant)` is incompatible with parent class type variable `Variable[T_co](covariant)` because subclasses cannot use more permissive type variables than their superclasses. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 14: Expected 1 errors -Line 113: Expected 1 errors -Line 163: Expected 1 errors -Line 167: Expected 1 errors -Line 191: Expected 1 errors -Lines 141, 142: Expected error (tag 'CoContra_Child5') -Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA') -""" diff --git a/conformance/results/pyre/generics_variance_inference.toml b/conformance/results/pyre/generics_variance_inference.toml deleted file mode 100644 index 39a5cb8c..00000000 --- a/conformance/results/pyre/generics_variance_inference.toml +++ /dev/null @@ -1,55 +0,0 @@ -conformant = "Partial" -notes = """ -Does not properly handle mixing legacy and PEP695 syntax. -False negative about a type variable not being present in the function's parameters. -""" -output = """ -generics_variance_inference.py:24:4 Incompatible variable type [9]: v1 is declared to have type `ClassA[int, int, int]` but is used as type `ClassA[float, int, int]`. -generics_variance_inference.py:25:4 Incompatible variable type [9]: v2 is declared to have type `ClassA[float, float, int]` but is used as type `ClassA[float, int, int]`. -generics_variance_inference.py:28:4 Incompatible variable type [9]: v4 is declared to have type `ClassA[int, int, int]` but is used as type `ClassA[int, float, float]`. -generics_variance_inference.py:33:41 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -generics_variance_inference.py:36:26 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -generics_variance_inference.py:48:0 Incompatible variable type [9]: vco2_1 is declared to have type `ShouldBeCovariant2[float]` but is used as type `ShouldBeCovariant2[int]`. -generics_variance_inference.py:49:0 Incompatible variable type [9]: vco2_2 is declared to have type `ShouldBeCovariant2[int]` but is used as type `ShouldBeCovariant2[float]`. -generics_variance_inference.py:53:25 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -generics_variance_inference.py:63:7 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`. -generics_variance_inference.py:75:19 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -generics_variance_inference.py:88:23 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -generics_variance_inference.py:104:27 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters. -generics_variance_inference.py:119:0 Incompatible variable type [9]: vinv3_1 is declared to have type `ShouldBeInvariant3[float, str]` but is used as type `ShouldBeInvariant3[int, str]`. -generics_variance_inference.py:120:0 Incompatible variable type [9]: vinv3_2 is declared to have type `ShouldBeInvariant3[int, str]` but is used as type `ShouldBeInvariant3[float, str]`. -generics_variance_inference.py:121:0 Incompatible variable type [9]: vinv3_3 is declared to have type `ShouldBeInvariant3[str, float]` but is used as type `ShouldBeInvariant3[str, int]`. -generics_variance_inference.py:122:0 Incompatible variable type [9]: vinv3_4 is declared to have type `ShouldBeInvariant3[str, int]` but is used as type `ShouldBeInvariant3[str, float]`. -generics_variance_inference.py:127:7 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`. -generics_variance_inference.py:169:0 Incompatible variable type [9]: a1 is declared to have type `ShouldBeInvariant6[int]` but is used as type `ShouldBeInvariant6[float]`. -generics_variance_inference.py:170:0 Incompatible variable type [9]: a2 is declared to have type `ShouldBeInvariant6[float]` but is used as type `ShouldBeInvariant6[int]`. -generics_variance_inference.py:181:0 Incompatible variable type [9]: b1 is declared to have type `ShouldBeCovariant6[int]` but is used as type `ShouldBeCovariant6[float]`. -generics_variance_inference.py:182:0 Incompatible variable type [9]: b2 is declared to have type `ShouldBeCovariant6[float]` but is used as type `ShouldBeCovariant6[int]`. -generics_variance_inference.py:193:0 Incompatible variable type [9]: c1 is declared to have type `ShouldBeContravariant2[int]` but is used as type `ShouldBeContravariant2[float]`. -generics_variance_inference.py:194:0 Incompatible variable type [9]: c2 is declared to have type `ShouldBeContravariant2[float]` but is used as type `ShouldBeContravariant2[int]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 41: Expected 1 errors -Line 58: Expected 1 errors -Line 67: Expected 1 errors -Line 80: Expected 1 errors -Line 96: Expected 1 errors -Line 97: Expected 1 errors -Line 111: Expected 1 errors -Line 112: Expected 1 errors -Line 130: Expected 1 errors -Line 138: Expected 1 errors -Line 149: Expected 1 errors -Line 33: Unexpected errors ["generics_variance_inference.py:33:41 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 36: Unexpected errors ["generics_variance_inference.py:36:26 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 48: Unexpected errors ['generics_variance_inference.py:48:0 Incompatible variable type [9]: vco2_1 is declared to have type `ShouldBeCovariant2[float]` but is used as type `ShouldBeCovariant2[int]`.'] -Line 53: Unexpected errors ["generics_variance_inference.py:53:25 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 63: Unexpected errors ["generics_variance_inference.py:63:7 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`."] -Line 75: Unexpected errors ["generics_variance_inference.py:75:19 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 88: Unexpected errors ["generics_variance_inference.py:88:23 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 104: Unexpected errors ["generics_variance_inference.py:104:27 Invalid type variable [34]: The type variable `Variable[T]` isn't present in the function's parameters."] -Line 127: Unexpected errors ["generics_variance_inference.py:127:7 Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[T]`. To reference the type variable, you can modify the class to inherit from `typing.Generic[T]`."] -Line 182: Unexpected errors ['generics_variance_inference.py:182:0 Incompatible variable type [9]: b2 is declared to have type `ShouldBeCovariant6[float]` but is used as type `ShouldBeCovariant6[int]`.'] -Line 193: Unexpected errors ['generics_variance_inference.py:193:0 Incompatible variable type [9]: c1 is declared to have type `ShouldBeContravariant2[int]` but is used as type `ShouldBeContravariant2[float]`.'] -""" diff --git a/conformance/results/pyre/historical_positional.toml b/conformance/results/pyre/historical_positional.toml deleted file mode 100644 index 96a40960..00000000 --- a/conformance/results/pyre/historical_positional.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -historical_positional.py:18:0 Unexpected keyword [28]: Unexpected keyword argument `__x` to call `f1`. -historical_positional.py:26:15 Invalid positional-only parameter [69]: Positional-only parameters cannot appear after parameters that accept keyword arguments. -historical_positional.py:38:25 Invalid positional-only parameter [69]: Positional-only parameters cannot appear after parameters that accept keyword arguments. -historical_positional.py:43:0 Unexpected keyword [28]: Unexpected keyword argument `__x` to call `A.m1`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/literals_interactions.toml b/conformance/results/pyre/literals_interactions.toml deleted file mode 100644 index a7af3cc4..00000000 --- a/conformance/results/pyre/literals_interactions.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Partial" -notes = """ -Does not detect out-of-bound tuple literal index. -Does not perform exhaustiveness checks on enums. -Does not narrow type of `x` with `x in Literal` type guard pattern. -Does not narrow type of `x` with `x == Literal` type guard pattern. -""" -output = """ -literals_interactions.py:15:4 Invalid tuple index [73]: Index 5 is out of bounds for concrete tuple with 3 members. -literals_interactions.py:16:4 Invalid tuple index [73]: Index -5 is out of bounds for concrete tuple with 3 members. -literals_interactions.py:17:4 Invalid tuple index [73]: Index 4 is out of bounds for concrete tuple with 3 members. -literals_interactions.py:18:4 Invalid tuple index [73]: Index -4 is out of bounds for concrete tuple with 3 members. -literals_interactions.py:93:8 Assert type [70]: Expected `str` but got `Union[Status, str]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 93: Unexpected errors ['literals_interactions.py:93:8 Assert type [70]: Expected `str` but got `Union[Status, str]`.'] -""" diff --git a/conformance/results/pyre/literals_literalstring.toml b/conformance/results/pyre/literals_literalstring.toml deleted file mode 100644 index 2367ab62..00000000 --- a/conformance/results/pyre/literals_literalstring.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Partial" -notes = """ -Incorrectly infers `str` rather than `LiteralString` when literal string `join` is used. -""" -output = """ -literals_literalstring.py:36:11 Invalid type [31]: Expression `LiteralString` is not a literal value. -literals_literalstring.py:36:11 Undefined or invalid type [11]: Annotation `typing` is not defined as a type. -literals_literalstring.py:37:13 Invalid type [31]: Expression `LiteralString` is not a literal value. -literals_literalstring.py:43:4 Incompatible variable type [9]: x2 is declared to have type `typing_extensions.Literal['']` but is used as type `typing_extensions.Literal['two']`. -literals_literalstring.py:52:4 Assert type [70]: Expected `typing_extensions.LiteralString` but got `str`. -literals_literalstring.py:66:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.LiteralString` but is used as type `str`. -literals_literalstring.py:74:4 Incompatible variable type [9]: x3 is declared to have type `typing_extensions.LiteralString` but is used as type `typing_extensions.Literal[3]`. -literals_literalstring.py:75:4 Incompatible variable type [9]: x4 is declared to have type `typing_extensions.LiteralString` but is used as type `typing_extensions.Literal[b'test']`. -literals_literalstring.py:120:21 Incompatible parameter type [6]: In call `literal_identity`, for 1st positional argument, expected `Variable[TLiteral (bound to typing_extensions.LiteralString)]` but got `str`. -literals_literalstring.py:134:50 Incompatible parameter type [6]: In call `Container.__init__`, for 1st positional argument, expected `Variable[T (bound to typing_extensions.LiteralString)]` but got `str`. -literals_literalstring.py:171:4 Incompatible variable type [9]: x1 is declared to have type `List[str]` but is used as type `List[typing_extensions.LiteralString]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 52: Unexpected errors ['literals_literalstring.py:52:4 Assert type [70]: Expected `typing_extensions.LiteralString` but got `str`.'] -""" diff --git a/conformance/results/pyre/literals_parameterizations.toml b/conformance/results/pyre/literals_parameterizations.toml deleted file mode 100644 index 2dbdfbc5..00000000 --- a/conformance/results/pyre/literals_parameterizations.toml +++ /dev/null @@ -1,35 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support type aliases in Literal type expression. -Does not support nested Literal type expression. -Does not reject tuple in Literal type expression. -Does not reject "bare" Literal in type expression. -""" -output = """ -literals_parameterizations.py:33:0 Invalid type [31]: Expression `AppendMode` is not a literal value. -literals_parameterizations.py:33:0 Invalid type [31]: Expression `ReadOnlyMode` is not a literal value. -literals_parameterizations.py:33:0 Invalid type [31]: Expression `WriteAndTruncateMode` is not a literal value. -literals_parameterizations.py:33:0 Invalid type [31]: Expression `WriteNoTruncateMode` is not a literal value. -literals_parameterizations.py:33:0 Undefined or invalid type [11]: Annotation `` is not defined as a type. -literals_parameterizations.py:41:6 Invalid type [31]: Expression `typing.Literal[3 + 4]` is not a valid type. -literals_parameterizations.py:42:6 Invalid type [31]: Expression `typing.Literal["foo".replace("o", "b")]` is not a valid type. -literals_parameterizations.py:43:6 Invalid type [31]: Expression `typing.Literal[4 + 3.000000j]` is not a valid type. -literals_parameterizations.py:44:6 Invalid type [31]: Expression `typing.Literal[~ 5]` is not a valid type. -literals_parameterizations.py:45:6 Invalid type [31]: Expression `typing.Literal[not False]` is not a valid type. -literals_parameterizations.py:47:6 Invalid type [31]: Expression `typing.Literal[{ "a":"b","c":"d" }]` is not a valid type. -literals_parameterizations.py:48:6 Invalid type [31]: Expression `typing.Literal[int]` is not a valid type. -literals_parameterizations.py:49:6 Invalid type [31]: Expression `variable` is not a literal value. -literals_parameterizations.py:50:7 Invalid type [31]: Expression `T` is not a literal value. -literals_parameterizations.py:51:7 Invalid type [31]: Expression `typing.Literal[3.140000]` is not a valid type. -literals_parameterizations.py:52:7 Invalid type [31]: Expression `Any` is not a literal value. -literals_parameterizations.py:53:7 Invalid type [31]: Expression `typing.Literal[...]` is not a valid type. -literals_parameterizations.py:56:19 Invalid type [31]: Expression `typing.Literal[1 + 2]` is not a valid type. -literals_parameterizations.py:61:3 Invalid type [31]: Expression `my_function` is not a literal value. -literals_parameterizations.py:65:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.Literal['Color.RED']` but is used as type `typing_extensions.Literal[Color.RED]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 46: Expected 1 errors -Line 60: Expected 1 errors -Line 33: Unexpected errors ['literals_parameterizations.py:33:0 Invalid type [31]: Expression `AppendMode` is not a literal value.', 'literals_parameterizations.py:33:0 Invalid type [31]: Expression `ReadOnlyMode` is not a literal value.', 'literals_parameterizations.py:33:0 Invalid type [31]: Expression `WriteAndTruncateMode` is not a literal value.', 'literals_parameterizations.py:33:0 Invalid type [31]: Expression `WriteNoTruncateMode` is not a literal value.', 'literals_parameterizations.py:33:0 Undefined or invalid type [11]: Annotation `` is not defined as a type.'] -""" diff --git a/conformance/results/pyre/literals_semantics.toml b/conformance/results/pyre/literals_semantics.toml deleted file mode 100644 index b2d2d151..00000000 --- a/conformance/results/pyre/literals_semantics.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -output = """ -literals_semantics.py:10:0 Incompatible variable type [9]: v2 is declared to have type `typing_extensions.Literal[3]` but is used as type `typing_extensions.Literal[4]`. -literals_semantics.py:24:4 Incompatible variable type [9]: x1 is declared to have type `typing_extensions.Literal[False]` but is used as type `typing_extensions.Literal[0]`. -literals_semantics.py:25:4 Incompatible variable type [9]: x2 is declared to have type `typing_extensions.Literal[0]` but is used as type `typing_extensions.Literal[False]`. -literals_semantics.py:33:4 Incompatible variable type [9]: a is declared to have type `Union[typing_extensions.Literal[3], typing_extensions.Literal[4], typing_extensions.Literal[5]]` but is used as type `int`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/namedtuples_define_class.toml b/conformance/results/pyre/namedtuples_define_class.toml deleted file mode 100644 index e6f03918..00000000 --- a/conformance/results/pyre/namedtuples_define_class.toml +++ /dev/null @@ -1,17 +0,0 @@ -output = """ -namedtuples_define_class.py:32:6 Invalid tuple index [73]: Index 3 is out of bounds for concrete tuple with 3 members. -namedtuples_define_class.py:33:6 Invalid tuple index [73]: Index -4 is out of bounds for concrete tuple with 3 members. -namedtuples_define_class.py:44:5 Missing argument [20]: Call `Point.__init__` expects argument `y`. -namedtuples_define_class.py:45:5 Missing argument [20]: Call `Point.__init__` expects argument `y`. -namedtuples_define_class.py:46:14 Incompatible parameter type [6]: In call `Point.__init__`, for 2nd positional argument, expected `int` but got `str`. -namedtuples_define_class.py:47:17 Incompatible parameter type [6]: In call `Point.__init__`, for argument `units`, expected `str` but got `int`. -namedtuples_define_class.py:48:5 Too many arguments [19]: Call `Point.__init__` expects 3 positional arguments, 4 were provided. -namedtuples_define_class.py:49:6 Unexpected keyword [28]: Unexpected keyword argument `other` to call `Point.__init__`. -namedtuples_define_class.py:59:4 Missing named tuple default [74]: Named tuple field without default value may not be preceded by a field with default value. -namedtuples_define_class.py:79:4 Invalid assignment [41]: Cannot reassign final attribute `x`. -namedtuples_define_class.py:98:18 Incompatible parameter type [6]: In call `Property.__init__`, for 2nd positional argument, expected `str` but got `float`. -namedtuples_define_class.py:105:23 Invalid inheritance [39]: If NamedTuple is included as a base class, the class may not extend anything else besides Generic. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/namedtuples_define_functional.toml b/conformance/results/pyre/namedtuples_define_functional.toml deleted file mode 100644 index dc132443..00000000 --- a/conformance/results/pyre/namedtuples_define_functional.toml +++ /dev/null @@ -1,19 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -namedtuples_define_functional.py:16:7 Missing argument [20]: Call `Point1.__init__` expects argument `y`. -namedtuples_define_functional.py:21:7 Missing argument [20]: Call `Point2.__init__` expects argument `x`. -namedtuples_define_functional.py:26:7 Too many arguments [19]: Call `Point3.__init__` expects 2 positional arguments, 3 were provided. -namedtuples_define_functional.py:31:7 Unexpected keyword [28]: Unexpected keyword argument `z` to call `Point4.__init__`. -namedtuples_define_functional.py:36:17 Incompatible parameter type [6]: In call `Point5.__init__`, for 2nd positional argument, expected `int` but got `str`. -namedtuples_define_functional.py:37:7 Too many arguments [19]: Call `Point5.__init__` expects 2 positional arguments, 3 were provided. -namedtuples_define_functional.py:42:17 Incompatible parameter type [6]: In call `Point6.__init__`, for 2nd positional argument, expected `int` but got `str`. -namedtuples_define_functional.py:43:14 Incompatible parameter type [6]: In call `Point6.__init__`, for argument `x`, expected `int` but got `float`. -namedtuples_define_functional.py:52:0 Duplicate parameter [65]: Duplicate parameter name `a`. -namedtuples_define_functional.py:52:0 Duplicate parameter [65]: Duplicate parameter name `a`. -namedtuples_define_functional.py:66:0 Missing argument [20]: Call `NT5.__init__` expects argument `a`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/namedtuples_type_compat.toml b/conformance/results/pyre/namedtuples_type_compat.toml deleted file mode 100644 index d9c3d790..00000000 --- a/conformance/results/pyre/namedtuples_type_compat.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -namedtuples_type_compat.py:22:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple. -namedtuples_type_compat.py:23:0 Incompatible variable type [9]: Unable to unpack `Point`, expected a tuple. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/namedtuples_usage.toml b/conformance/results/pyre/namedtuples_usage.toml deleted file mode 100644 index 9997fdec..00000000 --- a/conformance/results/pyre/namedtuples_usage.toml +++ /dev/null @@ -1,13 +0,0 @@ -output = """ -namedtuples_usage.py:34:6 Invalid tuple index [73]: Index 3 is out of bounds for concrete tuple with 3 members. -namedtuples_usage.py:35:6 Invalid tuple index [73]: Index -4 is out of bounds for concrete tuple with 3 members. -namedtuples_usage.py:40:0 Invalid assignment [41]: Cannot reassign final attribute `p.x`. -namedtuples_usage.py:41:0 Undefined attribute [16]: `Point` has no attribute `__setitem__`. -namedtuples_usage.py:42:0 Unable to delete tuple member [72]: Tuples are immutable, so their members may not be deleted. -namedtuples_usage.py:43:0 Unable to delete tuple member [72]: Tuples are immutable, so their members may not be deleted. -namedtuples_usage.py:52:0 Unable to unpack [23]: Unable to unpack 3 values, 2 were expected. -namedtuples_usage.py:53:0 Unable to unpack [23]: Unable to unpack 3 values, 4 were expected. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/narrowing_typeguard.toml b/conformance/results/pyre/narrowing_typeguard.toml deleted file mode 100644 index 3f370ecf..00000000 --- a/conformance/results/pyre/narrowing_typeguard.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -narrowing_typeguard.py:102:22 Invalid type guard [68]: User-defined type guard functions or methods must have at least one input parameter. -narrowing_typeguard.py:107:21 Invalid type guard [68]: User-defined type guard functions or methods must have at least one input parameter. -narrowing_typeguard.py:128:19 Incompatible parameter type [6]: In call `takes_callable_str`, for 1st positional argument, expected `typing.Callable[[object], str]` but got `typing.Callable(simple_typeguard)[[Named(val, object)], TypeGuard[int]]`. -narrowing_typeguard.py:148:25 Incompatible parameter type [6]: In call `takes_callable_str_proto`, for 1st positional argument, expected `CallableStrProto` but got `typing.Callable(simple_typeguard)[[Named(val, object)], TypeGuard[int]]`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/narrowing_typeis.toml b/conformance/results/pyre/narrowing_typeis.toml deleted file mode 100644 index f3d989e3..00000000 --- a/conformance/results/pyre/narrowing_typeis.toml +++ /dev/null @@ -1,15 +0,0 @@ -conformant = "Pass" -output = """ -narrowing_typeis.py:105:22 Invalid type guard [68]: User-defined type guard functions or methods must have at least one input parameter. -narrowing_typeis.py:110:21 Invalid type guard [68]: User-defined type guard functions or methods must have at least one input parameter. -narrowing_typeis.py:132:19 Incompatible parameter type [6]: In call `takes_callable_str`, for 1st positional argument, expected `typing.Callable[[object], str]` but got `typing.Callable(simple_typeguard)[[Named(val, object)], TypeIs[int]]`. -narrowing_typeis.py:152:25 Incompatible parameter type [6]: In call `takes_callable_str_proto`, for 1st positional argument, expected `CallableStrProto` but got `typing.Callable(simple_typeguard)[[Named(val, object)], TypeIs[int]]`. -narrowing_typeis.py:169:16 Incompatible parameter type [6]: In call `takes_typeguard`, for 1st positional argument, expected `typing.Callable[[object], TypeGuard[int]]` but got `typing.Callable(is_int_typeis)[[Named(val, object)], TypeIs[int]]`. -narrowing_typeis.py:170:13 Incompatible parameter type [6]: In call `takes_typeis`, for 1st positional argument, expected `typing.Callable[[object], TypeIs[int]]` but got `typing.Callable(is_int_typeguard)[[Named(val, object)], TypeGuard[int]]`. -narrowing_typeis.py:191:17 Incompatible parameter type [6]: In call `takes_int_typeis`, for 1st positional argument, expected `typing.Callable[[object], TypeIs[int]]` but got `typing.Callable(bool_typeis)[[Named(val, object)], TypeIs[bool]]`. -narrowing_typeis.py:195:26 Invalid type guard [68]: The narrowed type str of this type guard is not a subtype of the first positional parameter type int. -narrowing_typeis.py:199:44 Invalid type guard [68]: The narrowed type typing.List[int] of this type guard is not a subtype of the first positional parameter type typing.List[object]. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/overloads_basic.toml b/conformance/results/pyre/overloads_basic.toml deleted file mode 100644 index aebf2ded..00000000 --- a/conformance/results/pyre/overloads_basic.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ -overloads_basic.py:39:2 Incompatible parameter type [6]: In call `Bytes.__getitem__`, for 1st positional argument, expected `int` but got `str`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/overloads_consistency.toml b/conformance/results/pyre/overloads_consistency.toml deleted file mode 100644 index 5f38b134..00000000 --- a/conformance/results/pyre/overloads_consistency.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Partial" -notes = """ -Does not apply decorator transforms before checking overload consistency. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 108: Unexpected errors ['overloads_consistency.py:108:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`None`) is incompatible with the return type of the implementation (`bytes`).', 'overloads_consistency.py:108:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `108`.'] -Line 112: Unexpected errors ['overloads_consistency.py:112:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`str`) is incompatible with the return type of the implementation (`bytes`).', 'overloads_consistency.py:112:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `112`.', 'overloads_consistency.py:112:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -""" -output = """ -overloads_consistency.py:25:0 Incompatible overload [43]: The return type of overloaded function `return_type` (`str`) is incompatible with the return type of the implementation (`int`). -overloads_consistency.py:41:0 Incompatible overload [43]: The implementation of `parameter_type` does not accept all possible arguments of overload defined on line `41`. -overloads_consistency.py:108:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`None`) is incompatible with the return type of the implementation (`bytes`). -overloads_consistency.py:108:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `108`. -overloads_consistency.py:112:0 Incompatible overload [43]: The return type of overloaded function `decorated` (`str`) is incompatible with the return type of the implementation (`bytes`). -overloads_consistency.py:112:0 Incompatible overload [43]: The implementation of `decorated` does not accept all possible arguments of overload defined on line `112`. -overloads_consistency.py:112:0 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -""" diff --git a/conformance/results/pyre/overloads_definitions.toml b/conformance/results/pyre/overloads_definitions.toml deleted file mode 100644 index ecbcade1..00000000 --- a/conformance/results/pyre/overloads_definitions.toml +++ /dev/null @@ -1,30 +0,0 @@ -conformant = "Partial" -conformance_automated = "Fail" -notes = """ -Does not allow an overload with no implementation in a Protocol or an abstract base class. -Expects @final/@override on all overloads and implementation, instead of implementation only. -""" -errors_diff = """ -Lines 135, 136, 137, 141, 142: Expected error (tag 'invalid_final_2') -Lines 220, 221, 222, 225, 226: Expected error (tag 'override_impl') -Line 40: Unexpected errors ['overloads_definitions.py:40:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation.'] -Line 49: Unexpected errors ['overloads_definitions.py:49:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation.'] -Line 117: Unexpected errors ['overloads_definitions.py:117:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -Line 215: Unexpected errors ['overloads_definitions.py:215:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -""" -output = """ -overloads_definitions.py:16:0 Incompatible overload [43]: At least two overload signatures must be present. -overloads_definitions.py:28:0 Missing overload implementation [42]: Overloaded function `func2` must have an implementation. -overloads_definitions.py:40:4 Missing overload implementation [42]: Overloaded function `MyProto.func3` must have an implementation. -overloads_definitions.py:49:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.func4` must have an implementation. -overloads_definitions.py:59:4 Missing overload implementation [42]: Overloaded function `MyAbstractBase.not_abstract` must have an implementation. -overloads_definitions.py:81:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions.py:90:4 Incompatible overload [43]: The implementation of `C.func6` does not accept all possible arguments of overload defined on line `90`. -overloads_definitions.py:90:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions.py:117:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions.py:127:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions.py:181:4 Invalid override [40]: `overloads_definitions.Child.final_method` cannot override final method defined in `Base`. -overloads_definitions.py:198:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions.py:198:4 Invalid override [40]: `overloads_definitions.Child.bad_override` is decorated with @override, but no method of the same name exists in superclasses of `Child`. -overloads_definitions.py:215:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -""" diff --git a/conformance/results/pyre/overloads_definitions_stub.toml b/conformance/results/pyre/overloads_definitions_stub.toml deleted file mode 100644 index 7734a442..00000000 --- a/conformance/results/pyre/overloads_definitions_stub.toml +++ /dev/null @@ -1,25 +0,0 @@ -conformant = "Partial" -notes = """ -Expects @final and @override to be present on all overloads, not just first. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 67, 69, 71, 72, 73: Expected error (tag 'invalid_final') -Lines 80, 82, 84, 85, 86: Expected error (tag 'invalid_final_2') -Lines 102, 107, 108, 111, 113: Expected error (tag 'override-final') -Line 63: Unexpected errors ['overloads_definitions_stub.pyi:63:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -Line 76: Unexpected errors ['overloads_definitions_stub.pyi:76:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -Line 125: Unexpected errors ['overloads_definitions_stub.pyi:125:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -Line 138: Unexpected errors ['overloads_definitions_stub.pyi:138:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -""" -output = """ -overloads_definitions_stub.pyi:14:0 Incompatible overload [43]: At least two overload signatures must be present. -overloads_definitions_stub.pyi:37:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions_stub.pyi:44:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions_stub.pyi:63:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions_stub.pyi:76:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions_stub.pyi:122:4 Invalid override [40]: `overloads_definitions_stub.Child.bad_override` is decorated with @override, but no method of the same name exists in superclasses of `Child`. -overloads_definitions_stub.pyi:125:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions_stub.pyi:138:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -overloads_definitions_stub.pyi:147:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -""" diff --git a/conformance/results/pyre/overloads_evaluation.toml b/conformance/results/pyre/overloads_evaluation.toml deleted file mode 100644 index c5ca3378..00000000 --- a/conformance/results/pyre/overloads_evaluation.toml +++ /dev/null @@ -1,47 +0,0 @@ -conformant = "Partial" -notes = """ -Does not expand boolean arguments to Literal[True] and Literal[False]. -Does not expand enum arguments to literal variants. -Does not expand type[A | B] to type[A] and type[B]. -Does not expand tuple arguments to possible combinations. -Does not prefer variadic match to indeterminate-length unpacked argument. -Does not treat multiple matches due to gradual types as ambiguous. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 105: Unexpected errors ['overloads_evaluation.py:105:23 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`.'] -Line 106: Unexpected errors ['overloads_evaluation.py:106:4 Assert type [70]: Expected `Union[int, str]` but got `str`.'] -Line 134: Unexpected errors ['overloads_evaluation.py:134:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`.'] -Line 135: Unexpected errors ['overloads_evaluation.py:135:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.'] -Line 160: Unexpected errors ['overloads_evaluation.py:160:23 Incompatible parameter type [6]: In call `expand_enum`, for 1st positional argument, expected `typing_extensions.Literal[Color.RED]` but got `Color`.'] -Line 161: Unexpected errors ['overloads_evaluation.py:161:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`.'] -Line 180: Unexpected errors ['overloads_evaluation.py:180:29 Incompatible parameter type [6]: In call `expand_type_union`, for 1st positional argument, expected `Type[int]` but got `Type[Union[int, str]]`.'] -Line 181: Unexpected errors ['overloads_evaluation.py:181:4 Assert type [70]: Expected `Union[int, str]` but got `int`.'] -Line 204: Unexpected errors ['overloads_evaluation.py:204:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`.'] -Line 205: Unexpected errors ['overloads_evaluation.py:205:4 Assert type [70]: Expected `Union[int, str]` but got `int`.'] -Line 234: Unexpected errors ['overloads_evaluation.py:234:4 Assert type [70]: Expected `int` but got `str`.'] -Line 264: Unexpected errors ['overloads_evaluation.py:264:4 Assert type [70]: Expected `typing.Any` but got `List[int]`.'] -Line 280: Unexpected errors ['overloads_evaluation.py:280:4 Assert type [70]: Expected `typing.Any` but got `List[int]`.'] -Line 345: Unexpected errors ['overloads_evaluation.py:345:4 Assert type [70]: Expected `typing.Any` but got `List[int]`.'] -""" -output = """ -overloads_evaluation.py:38:0 Missing argument [20]: Call `example1_1` expects argument `x`. -overloads_evaluation.py:46:14 Incompatible parameter type [6]: In call `example1_1`, for 2nd positional argument, expected `str` but got `int`. -overloads_evaluation.py:51:11 Incompatible parameter type [6]: In call `example1_1`, for 1st positional argument, expected `str` but got `int`. -overloads_evaluation.py:105:23 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`. -overloads_evaluation.py:106:4 Assert type [70]: Expected `Union[int, str]` but got `str`. -overloads_evaluation.py:115:13 Incompatible parameter type [6]: In call `example2`, for 1st positional argument, expected `int` but got `Union[int, str]`. -overloads_evaluation.py:115:16 Incompatible parameter type [6]: In call `example2`, for 2nd positional argument, expected `str` but got `Union[int, str]`. -overloads_evaluation.py:134:23 Incompatible parameter type [6]: In call `expand_bool`, for 1st positional argument, expected `typing_extensions.Literal[False]` but got `bool`. -overloads_evaluation.py:135:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`. -overloads_evaluation.py:160:23 Incompatible parameter type [6]: In call `expand_enum`, for 1st positional argument, expected `typing_extensions.Literal[Color.RED]` but got `Color`. -overloads_evaluation.py:161:4 Assert type [70]: Expected `Union[typing_extensions.Literal[0], typing_extensions.Literal[1]]` but got `typing_extensions.Literal[0]`. -overloads_evaluation.py:180:29 Incompatible parameter type [6]: In call `expand_type_union`, for 1st positional argument, expected `Type[int]` but got `Type[Union[int, str]]`. -overloads_evaluation.py:181:4 Assert type [70]: Expected `Union[int, str]` but got `int`. -overloads_evaluation.py:204:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`. -overloads_evaluation.py:205:4 Assert type [70]: Expected `Union[int, str]` but got `int`. -overloads_evaluation.py:234:4 Assert type [70]: Expected `int` but got `str`. -overloads_evaluation.py:264:4 Assert type [70]: Expected `typing.Any` but got `List[int]`. -overloads_evaluation.py:280:4 Assert type [70]: Expected `typing.Any` but got `List[int]`. -overloads_evaluation.py:345:4 Assert type [70]: Expected `typing.Any` but got `List[int]`. -""" diff --git a/conformance/results/pyre/protocols_class_objects.toml b/conformance/results/pyre/protocols_class_objects.toml deleted file mode 100644 index 9a640450..00000000 --- a/conformance/results/pyre/protocols_class_objects.toml +++ /dev/null @@ -1,21 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject protocol class assigned to type[Proto]. -Incorrectly reports some class objects as incompatible with a protocol. -Fails to report some class objects as incompatible with a protocol. -""" -output = """ -protocols_class_objects.py:26:11 Invalid class instantiation [45]: Cannot instantiate abstract class `Proto` with abstract method `meth`. -protocols_class_objects.py:58:0 Incompatible variable type [9]: pa1 is declared to have type `ProtoA1` but is used as type `Type[ConcreteA]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 34: Expected 1 errors -Line 74: Expected 1 errors -Line 104: Expected 1 errors -Line 106: Expected 1 errors -Line 107: Expected 1 errors -Line 108: Expected 1 errors -Line 26: Unexpected errors ['protocols_class_objects.py:26:11 Invalid class instantiation [45]: Cannot instantiate abstract class `Proto` with abstract method `meth`.'] -""" diff --git a/conformance/results/pyre/protocols_definition.toml b/conformance/results/pyre/protocols_definition.toml deleted file mode 100644 index 10231997..00000000 --- a/conformance/results/pyre/protocols_definition.toml +++ /dev/null @@ -1,35 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar or vice versa. -Does not reject read-only property in concrete class when attribute in protocol is mutable. -Does not reject covariant attribute type when protocol attribute is mutable. -Does not reject read-only property in concrete class when protocol has settable property. -Does not reject immutable named tuple attribute in concrete class when protocol attribute is mutable. -Does not reject immutable frozen dataclass attribute in concrete class when protocol attribute is mutable. -""" -output = """ -protocols_definition.py:30:10 Incompatible parameter type [6]: In call `close_all`, for 1st positional argument, expected `Iterable[SupportsClose]` but got `Iterable[int]`. -protocols_definition.py:67:8 Undefined attribute [16]: `Template` has no attribute `temp`. -protocols_definition.py:114:0 Incompatible variable type [9]: v2_bad1 is declared to have type `Template2` but is used as type `Concrete2_Bad1`. -protocols_definition.py:115:0 Incompatible variable type [9]: v2_bad2 is declared to have type `Template2` but is used as type `Concrete2_Bad2`. -protocols_definition.py:156:0 Incompatible variable type [9]: v3_bad1 is declared to have type `Template3` but is used as type `Concrete3_Bad1`. -protocols_definition.py:159:0 Incompatible variable type [9]: v3_bad4 is declared to have type `Template3` but is used as type `Concrete3_Bad4`. -protocols_definition.py:218:0 Incompatible variable type [9]: v4_bad1 is declared to have type `Template4` but is used as type `Concrete4_Bad1`. -protocols_definition.py:219:0 Incompatible variable type [9]: v4_bad2 is declared to have type `Template4` but is used as type `Concrete4_Bad2`. -protocols_definition.py:285:0 Incompatible variable type [9]: v5_bad1 is declared to have type `Template5` but is used as type `Concrete5_Bad1`. -protocols_definition.py:286:0 Incompatible variable type [9]: v5_bad2 is declared to have type `Template5` but is used as type `Concrete5_Bad2`. -protocols_definition.py:287:0 Incompatible variable type [9]: v5_bad3 is declared to have type `Template5` but is used as type `Concrete5_Bad3`. -protocols_definition.py:288:0 Incompatible variable type [9]: v5_bad4 is declared to have type `Template5` but is used as type `Concrete5_Bad4`. -protocols_definition.py:289:0 Incompatible variable type [9]: v5_bad5 is declared to have type `Template5` but is used as type `Concrete5_Bad5`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 116: Expected 1 errors -Line 117: Expected 1 errors -Line 157: Expected 1 errors -Line 158: Expected 1 errors -Line 160: Expected 1 errors -Line 339: Expected 1 errors -Line 340: Expected 1 errors -Line 341: Expected 1 errors -""" diff --git a/conformance/results/pyre/protocols_explicit.toml b/conformance/results/pyre/protocols_explicit.toml deleted file mode 100644 index 5a36eda0..00000000 --- a/conformance/results/pyre/protocols_explicit.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report error when calling unimplemented protocol method from derived class. -Does not report error when method is not implemented in derived class. -""" -output = """ -protocols_explicit.py:60:4 Invalid class instantiation [45]: Cannot instantiate abstract class `Point` with abstract method `intensity`. -protocols_explicit.py:83:0 Uninitialized attribute [13]: Attribute `cm1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized. -protocols_explicit.py:164:6 Invalid class instantiation [45]: Cannot instantiate abstract class `Concrete7A` with abstract method `method1`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 27: Expected 1 errors -Line 56: Expected 1 errors -Line 89: Expected 1 errors -Line 134: Expected 1 errors -Line 83: Unexpected errors ['protocols_explicit.py:83:0 Uninitialized attribute [13]: Attribute `cm1` inherited from protocol `Proto1` in class `Concrete1` to have type `int` but is never initialized.'] -""" diff --git a/conformance/results/pyre/protocols_generic.toml b/conformance/results/pyre/protocols_generic.toml deleted file mode 100644 index dd13ab52..00000000 --- a/conformance/results/pyre/protocols_generic.toml +++ /dev/null @@ -1,19 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject the use of Protocol and Generic together as base classes. -Does not detect protocol mismatch when method-scoped TypeVar is used in protocol. -""" -output = """ -protocols_generic.py:40:0 Incompatible variable type [9]: p2 is declared to have type `Proto1[int, str]` but is used as type `Concrete1`. -protocols_generic.py:44:29 Invalid inheritance [39]: Subscripted Protocol and Generic may not appear in the same base class list -protocols_generic.py:56:4 Incompatible variable type [9]: v2 is declared to have type `Box[int]` but is used as type `Box[float]`. -protocols_generic.py:66:4 Incompatible variable type [9]: v2 is declared to have type `Sender[float]` but is used as type `Sender[int]`. -protocols_generic.py:74:4 Incompatible variable type [9]: v1 is declared to have type `AttrProto[float]` but is used as type `AttrProto[int]`. -protocols_generic.py:75:4 Incompatible variable type [9]: v2 is declared to have type `AttrProto[int]` but is used as type `AttrProto[float]`. -protocols_generic.py:146:0 Incompatible variable type [9]: hp3 is declared to have type `HasPropertyProto` but is used as type `ConcreteHasProperty3`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 145: Expected 1 errors -Line 147: Expected 1 errors -""" diff --git a/conformance/results/pyre/protocols_merging.toml b/conformance/results/pyre/protocols_merging.toml deleted file mode 100644 index 05c0cbd4..00000000 --- a/conformance/results/pyre/protocols_merging.toml +++ /dev/null @@ -1,14 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -protocols_merging.py:52:0 Incompatible variable type [9]: s6 is declared to have type `SizedAndClosable1` but is used as type `SCConcrete2`. -protocols_merging.py:53:0 Incompatible variable type [9]: s7 is declared to have type `SizedAndClosable2` but is used as type `SCConcrete2`. -protocols_merging.py:54:0 Incompatible variable type [9]: s8 is declared to have type `SizedAndClosable3` but is used as type `SCConcrete2`. -protocols_merging.py:67:15 Invalid inheritance [39]: If Protocol is included as a base class, all other base classes must be protocols or Generic. -protocols_merging.py:82:4 Invalid class instantiation [45]: Cannot instantiate abstract class `SizedAndClosable4` with abstract method `close`. -protocols_merging.py:83:0 Incompatible variable type [9]: y is declared to have type `SizedAndClosable4` but is used as type `SCConcrete1`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/protocols_modules.toml b/conformance/results/pyre/protocols_modules.toml deleted file mode 100644 index cce8d663..00000000 --- a/conformance/results/pyre/protocols_modules.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not perform protocol checks for modules. -""" -output = """ -""" -conformance_automated = "Fail" -errors_diff = """ -Line 26: Expected 1 errors -Line 48: Expected 1 errors -Line 49: Expected 1 errors -""" diff --git a/conformance/results/pyre/protocols_recursive.toml b/conformance/results/pyre/protocols_recursive.toml deleted file mode 100644 index 5e485e85..00000000 --- a/conformance/results/pyre/protocols_recursive.toml +++ /dev/null @@ -1,6 +0,0 @@ -conformant = "Pass" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/protocols_runtime_checkable.toml b/conformance/results/pyre/protocols_runtime_checkable.toml deleted file mode 100644 index 7b1d73b0..00000000 --- a/conformance/results/pyre/protocols_runtime_checkable.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not reject isinstance or issubclass call for protocol that is not runtime_checkable. -Does not reject issubclass call for data protocol. -Does not report unsafe overlap for runtime_checkable protocol. -""" -output = """ -""" -conformance_automated = "Fail" -errors_diff = """ -Line 23: Expected 1 errors -Line 55: Expected 1 errors -Line 61: Expected 1 errors -Line 88: Expected 1 errors -Line 92: Expected 1 errors -Line 96: Expected 1 errors -""" diff --git a/conformance/results/pyre/protocols_self.toml b/conformance/results/pyre/protocols_self.toml deleted file mode 100644 index 5e485e85..00000000 --- a/conformance/results/pyre/protocols_self.toml +++ /dev/null @@ -1,6 +0,0 @@ -conformant = "Pass" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/protocols_subtyping.toml b/conformance/results/pyre/protocols_subtyping.toml deleted file mode 100644 index 1c8c18fc..00000000 --- a/conformance/results/pyre/protocols_subtyping.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Pass" -output = """ -protocols_subtyping.py:16:5 Invalid class instantiation [45]: Cannot instantiate protocol `Proto1`. -protocols_subtyping.py:38:4 Incompatible variable type [9]: v2 is declared to have type `Concrete2` but is used as type `Proto2`. -protocols_subtyping.py:55:4 Incompatible variable type [9]: v2 is declared to have type `Proto3` but is used as type `Proto2`. -protocols_subtyping.py:79:4 Incompatible variable type [9]: v3 is declared to have type `Proto4[int, float]` but is used as type `Proto5[int]`. -protocols_subtyping.py:80:4 Incompatible variable type [9]: v4 is declared to have type `Proto5[float]` but is used as type `Proto4[int, int]`. -protocols_subtyping.py:102:4 Incompatible variable type [9]: v4 is declared to have type `Proto7[int, float]` but is used as type `Proto6[float, float]`. -protocols_subtyping.py:103:4 Incompatible variable type [9]: v5 is declared to have type `Proto7[float, object]` but is used as type `Proto6[float, float]`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/protocols_variance.toml b/conformance/results/pyre/protocols_variance.toml deleted file mode 100644 index 5577f252..00000000 --- a/conformance/results/pyre/protocols_variance.toml +++ /dev/null @@ -1,18 +0,0 @@ -conformant = "Unsupported" -notes = """ -Does not detect incorrect TypeVar variance within generic protocols. -""" -output = """ -protocols_variance.py:62:17 Invalid type variance [46]: The type variable `Variable[T1_co](covariant)` is covariant and cannot be a parameter type. -protocols_variance.py:72:4 Invalid type variance [46]: The type variable `Variable[T1_contra](contravariant)` is contravariant and cannot be a return type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 21: Expected 1 errors -Line 40: Expected 1 errors -Line 56: Expected 1 errors -Line 61: Expected 1 errors -Line 66: Expected 1 errors -Line 71: Expected 1 errors -Line 104: Expected 1 errors -""" diff --git a/conformance/results/pyre/qualifiers_annotated.toml b/conformance/results/pyre/qualifiers_annotated.toml deleted file mode 100644 index 16068663..00000000 --- a/conformance/results/pyre/qualifiers_annotated.toml +++ /dev/null @@ -1,34 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject Annotated with a single parameter. -Does not reject call of Annotated with no type arguments. -""" -output = """ -qualifiers_annotated.py:38:6 Undefined or invalid type [11]: Annotation `` is not defined as a type. -qualifiers_annotated.py:39:6 Invalid type [31]: Expression `typing.Annotated[(((int, str)), "")]` is not a valid type. -qualifiers_annotated.py:40:6 Invalid type [31]: Expression `typing.Annotated[(comprehension(int for generators(generator(i in range(1) if ))), "")]` is not a valid type. -qualifiers_annotated.py:41:6 Invalid type [31]: Expression `typing.Annotated[({ "a":"b" }, "")]` is not a valid type. -qualifiers_annotated.py:42:6 Invalid type [31]: Expression `typing.Annotated[(lambda () (int)(), "")]` is not a valid type. -qualifiers_annotated.py:43:6 Invalid type [31]: Expression `typing.Annotated[([int][0], "")]` is not a valid type. -qualifiers_annotated.py:44:6 Invalid type [31]: Expression `typing.Annotated[(int if 1 < 3 else str, "")]` is not a valid type. -qualifiers_annotated.py:45:16 Unbound name [10]: Name `var1` is used but not defined in the current scope. -qualifiers_annotated.py:46:6 Invalid type [31]: Expression `typing.Annotated[(True, "")]` is not a valid type. -qualifiers_annotated.py:47:7 Invalid type [31]: Expression `typing.Annotated[(1, "")]` is not a valid type. -qualifiers_annotated.py:48:7 Invalid type [31]: Expression `typing.Annotated[(list or set, "")]` is not a valid type. -qualifiers_annotated.py:49:7 Invalid type [31]: Expression `typing.Annotated[(f"{"int"}", "")]` is not a valid type. -qualifiers_annotated.py:59:7 Invalid type parameters [24]: Generic type `Annotated` expects at least 2 type parameters, received 1. -qualifiers_annotated.py:72:0 Incompatible variable type [9]: not_type2 is declared to have type `Type[typing.Any]` but is used as type `TypeAlias`. -qualifiers_annotated.py:80:6 Incompatible parameter type [6]: In call `func4`, for 1st positional argument, expected `Type[Variable[T]]` but got `TypeAlias`. -qualifiers_annotated.py:86:0 Invalid class instantiation [45]: `Annotated` cannot be instantiated. -qualifiers_annotated.py:88:0 Call error [29]: `TypeAlias` is not a function. -qualifiers_annotated.py:100:4 Undefined attribute [16]: `typing.Type` has no attribute `a`. -qualifiers_annotated.py:101:4 Undefined attribute [16]: `typing.Type` has no attribute `b`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 71: Expected 1 errors -Line 79: Expected 1 errors -Line 87: Expected 1 errors -Line 100: Unexpected errors ['qualifiers_annotated.py:100:4 Undefined attribute [16]: `typing.Type` has no attribute `a`.'] -Line 101: Unexpected errors ['qualifiers_annotated.py:101:4 Undefined attribute [16]: `typing.Type` has no attribute `b`.'] -""" diff --git a/conformance/results/pyre/qualifiers_final_annotation.toml b/conformance/results/pyre/qualifiers_final_annotation.toml deleted file mode 100644 index f9b7dff8..00000000 --- a/conformance/results/pyre/qualifiers_final_annotation.toml +++ /dev/null @@ -1,40 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report Final variable with missing initialization in module scope. -Does not report error for invalid nesting of Final and ClassVar. -Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition. -Does not reject modification of imported variable declared Final. -""" -output = """ -qualifiers_final_annotation.py:18:6 Invalid type parameters [24]: Generic type `Final` expects 1 type parameter, received 2. -qualifiers_final_annotation.py:34:4 Invalid assignment [41]: Cannot reassign final attribute `ClassA.ID2`. -qualifiers_final_annotation.py:38:4 Uninitialized attribute [13]: Attribute `ID3` is declared in class `ClassA` to have type `int` but is never initialized. -qualifiers_final_annotation.py:54:8 Invalid assignment [41]: Cannot reassign final attribute `self.ID5`. -qualifiers_final_annotation.py:62:8 Undefined attribute [16]: `ClassA` has no attribute `id3`. -qualifiers_final_annotation.py:63:8 Undefined attribute [16]: `ClassA` has no attribute `id4`. -qualifiers_final_annotation.py:65:8 Invalid assignment [41]: Cannot reassign final attribute `self.ID7`. -qualifiers_final_annotation.py:67:8 Invalid assignment [41]: Cannot reassign final attribute `self.ID7`. -qualifiers_final_annotation.py:71:0 Invalid assignment [41]: Cannot reassign final attribute `RATE`. -qualifiers_final_annotation.py:81:0 Invalid assignment [41]: Cannot reassign final attribute `ClassB.DEFAULT_ID`. -qualifiers_final_annotation.py:94:4 Invalid assignment [41]: Cannot reassign final attribute `BORDER_WIDTH`. -qualifiers_final_annotation.py:118:0 Invalid type [31]: Expression `typing.List[Final[int]]` is not a valid type. Final cannot be nested. -qualifiers_final_annotation.py:121:10 Invalid type [31]: Parameter `x` cannot be annotated with Final. -qualifiers_final_annotation.py:133:0 Unexpected keyword [28]: Unexpected keyword argument `x` to call `N.__init__`. -qualifiers_final_annotation.py:134:0 Unexpected keyword [28]: Unexpected keyword argument `a` to call `N.__init__`. -qualifiers_final_annotation.py:135:0 Unexpected keyword [28]: Unexpected keyword argument `x` to call `N.__init__`. -qualifiers_final_annotation.py:141:4 Invalid assignment [41]: Cannot reassign final attribute `ID1`. -qualifiers_final_annotation.py:145:4 Invalid assignment [41]: Cannot reassign final attribute `x`. -qualifiers_final_annotation.py:147:9 Invalid assignment [41]: Cannot reassign final attribute `x`. -qualifiers_final_annotation.py:149:8 Invalid assignment [41]: Cannot reassign final attribute `x`. -qualifiers_final_annotation.py:152:29 Invalid assignment [41]: Cannot reassign final attribute `x`. -qualifiers_final_annotation.py:155:8 Invalid assignment [41]: Cannot reassign final attribute `x`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 16: Expected 1 errors -Line 107: Expected 1 errors -Line 108: Expected 1 errors -Line 166: Expected 1 errors -Line 170: Expected 1 errors -Line 133: Unexpected errors ['qualifiers_final_annotation.py:133:0 Unexpected keyword [28]: Unexpected keyword argument `x` to call `N.__init__`.'] -""" diff --git a/conformance/results/pyre/qualifiers_final_decorator.toml b/conformance/results/pyre/qualifiers_final_decorator.toml deleted file mode 100644 index 09c5e28b..00000000 --- a/conformance/results/pyre/qualifiers_final_decorator.toml +++ /dev/null @@ -1,24 +0,0 @@ -conformant = "Partial" -notes = """ -Reports error for overloaded method implementation marked @final if its overloads do not. -Does not report error for overloaded @final method defined in stub file. -Reports misleading error when overload is marked @final but implementation is not. -""" -output = """ -qualifiers_final_decorator.py:21:0 Invalid inheritance [39]: Cannot inherit from final class `Base1`. -qualifiers_final_decorator.py:51:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -qualifiers_final_decorator.py:56:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method1` cannot override final method defined in `Base2`. -qualifiers_final_decorator.py:60:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method2` cannot override final method defined in `Base2`. -qualifiers_final_decorator.py:64:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method3` cannot override final method defined in `Base2`. -qualifiers_final_decorator.py:75:4 Invalid override [40]: `qualifiers_final_decorator.Derived2.method4` cannot override final method defined in `Base2`. -qualifiers_final_decorator.py:86:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s). -qualifiers_final_decorator.py:118:4 Inconsistent override [14]: `qualifiers_final_decorator.Derived5.method` overrides method defined in `Base5_2` inconsistently. Could not find parameter `v` in overriding signature. -qualifiers_final_decorator.py:118:4 Invalid override [40]: `qualifiers_final_decorator.Derived5.method` cannot override final method defined in `Base5_2`. -qualifiers_final_decorator.py:126:0 Invalid inheritance [39]: `final` cannot be used with non-method functions. -""" -conformance_automated = "Fail" -errors_diff = """ -Lines 80, 81, 89: Expected error (tag 'Derived3') -Lines 94, 95, 102: Expected error (tag 'Derived4') -Line 51: Unexpected errors ['qualifiers_final_decorator.py:51:4 Incompatible overload [43]: This definition does not have the same decorators as the preceding overload(s).'] -""" diff --git a/conformance/results/pyre/specialtypes_any.toml b/conformance/results/pyre/specialtypes_any.toml deleted file mode 100644 index 07cd73b2..00000000 --- a/conformance/results/pyre/specialtypes_any.toml +++ /dev/null @@ -1,8 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/specialtypes_never.toml b/conformance/results/pyre/specialtypes_never.toml deleted file mode 100644 index 1cdfcc0b..00000000 --- a/conformance/results/pyre/specialtypes_never.toml +++ /dev/null @@ -1,22 +0,0 @@ -conformant = "Partial" -notes = """ -Does not treat Never as compatible with all other types. -""" -output = """ -specialtypes_never.py:19:21 Incompatible return type [7]: Function declared non-returnable, but got implicit return value of `None`. -specialtypes_never.py:68:4 Incompatible variable type [9]: v1 is declared to have type `int` but is used as type `Never`. -specialtypes_never.py:69:4 Incompatible variable type [9]: v2 is declared to have type `str` but is used as type `Never`. -specialtypes_never.py:70:4 Incompatible variable type [9]: v3 is declared to have type `List[str]` but is used as type `Never`. -specialtypes_never.py:86:4 Incompatible variable type [9]: v3 is declared to have type `List[int]` but is used as type `List[Never]`. -specialtypes_never.py:87:4 Incompatible variable type [9]: v4 is declared to have type `Never` but is used as type `NoReturn`. -specialtypes_never.py:96:4 Incompatible return type [7]: Expected `ClassB[Variable[U]]` but got `ClassB[Never]`. -specialtypes_never.py:105:4 Incompatible return type [7]: Expected `ClassC[Variable[U]]` but got `ClassC[Never]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 68: Unexpected errors ['specialtypes_never.py:68:4 Incompatible variable type [9]: v1 is declared to have type `int` but is used as type `Never`.'] -Line 69: Unexpected errors ['specialtypes_never.py:69:4 Incompatible variable type [9]: v2 is declared to have type `str` but is used as type `Never`.'] -Line 70: Unexpected errors ['specialtypes_never.py:70:4 Incompatible variable type [9]: v3 is declared to have type `List[str]` but is used as type `Never`.'] -Line 87: Unexpected errors ['specialtypes_never.py:87:4 Incompatible variable type [9]: v4 is declared to have type `Never` but is used as type `NoReturn`.'] -Line 96: Unexpected errors ['specialtypes_never.py:96:4 Incompatible return type [7]: Expected `ClassB[Variable[U]]` but got `ClassB[Never]`.'] -""" diff --git a/conformance/results/pyre/specialtypes_none.toml b/conformance/results/pyre/specialtypes_none.toml deleted file mode 100644 index a9c3b091..00000000 --- a/conformance/results/pyre/specialtypes_none.toml +++ /dev/null @@ -1,9 +0,0 @@ -conformant = "Pass" -output = """ -specialtypes_none.py:21:6 Incompatible parameter type [6]: In call `func1`, for 1st positional argument, expected `None` but got `Type[None]`. -specialtypes_none.py:27:0 Incompatible variable type [9]: none2 is declared to have type `Iterable[typing.Any]` but is used as type `None`. -specialtypes_none.py:41:6 Incompatible parameter type [6]: In call `func2`, for 1st positional argument, expected `Type[None]` but got `None`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/specialtypes_promotions.toml b/conformance/results/pyre/specialtypes_promotions.toml deleted file mode 100644 index fb9055fb..00000000 --- a/conformance/results/pyre/specialtypes_promotions.toml +++ /dev/null @@ -1,10 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of attribute that is compatible only with float. -""" -output = """ -""" -conformance_automated = "Fail" -errors_diff = """ -Line 13: Expected 1 errors -""" diff --git a/conformance/results/pyre/specialtypes_type.toml b/conformance/results/pyre/specialtypes_type.toml deleted file mode 100644 index a2a0c9c5..00000000 --- a/conformance/results/pyre/specialtypes_type.toml +++ /dev/null @@ -1,42 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject Callable when passed to type[T]. -Does not treat `type` same as `type[Any]` for assert_type. -Does not allow access to unknown attributes from object of type `type[Any]`. -Does not reject access to unknown attributes from object of type `Type[object]`. -Reports type incompatibility between `type` and `Callable[..., Any]`. -""" -output = """ -specialtypes_type.py:56:6 Incompatible parameter type [6]: In call `func4`, for 1st positional argument, expected `Type[Union[BasicUser, ProUser]]` but got `Type[TeamUser]`. -specialtypes_type.py:76:11 Invalid type parameters [24]: Generic type `type` expects 1 type parameter, received 2, use `typing.Type[]` to avoid runtime subscripting errors. -specialtypes_type.py:98:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`. -specialtypes_type.py:99:4 Assert type [70]: Expected `typing.Any` but got `unknown`. -specialtypes_type.py:102:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`. -specialtypes_type.py:103:4 Assert type [70]: Expected `typing.Any` but got `unknown`. -specialtypes_type.py:106:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`. -specialtypes_type.py:107:4 Assert type [70]: Expected `typing.Any` but got `unknown`. -specialtypes_type.py:110:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`. -specialtypes_type.py:111:4 Assert type [70]: Expected `typing.Any` but got `unknown`. -specialtypes_type.py:117:4 Undefined attribute [16]: `object` has no attribute `unknown`. -specialtypes_type.py:143:0 Undefined attribute [16]: `TypeAlias` has no attribute `unknown`. -specialtypes_type.py:165:4 Incompatible variable type [9]: x1 is declared to have type `typing.Callable[..., typing.Any]` but is used as type `Type[typing.Any]`. -specialtypes_type.py:166:4 Incompatible variable type [9]: x2 is declared to have type `typing.Callable[[int, int], int]` but is used as type `Type[typing.Any]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 70: Expected 1 errors -Line 120: Expected 1 errors -Line 144: Expected 1 errors -Line 145: Expected 1 errors -Line 146: Expected 1 errors -Line 98: Unexpected errors ['specialtypes_type.py:98:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`.'] -Line 99: Unexpected errors ['specialtypes_type.py:99:4 Assert type [70]: Expected `typing.Any` but got `unknown`.'] -Line 102: Unexpected errors ['specialtypes_type.py:102:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`.'] -Line 103: Unexpected errors ['specialtypes_type.py:103:4 Assert type [70]: Expected `typing.Any` but got `unknown`.'] -Line 106: Unexpected errors ['specialtypes_type.py:106:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`.'] -Line 107: Unexpected errors ['specialtypes_type.py:107:4 Assert type [70]: Expected `typing.Any` but got `unknown`.'] -Line 110: Unexpected errors ['specialtypes_type.py:110:4 Assert type [70]: Expected `typing.Tuple[Type[typing.Any], ...]` but got `unknown`.'] -Line 111: Unexpected errors ['specialtypes_type.py:111:4 Assert type [70]: Expected `typing.Any` but got `unknown`.'] -Line 165: Unexpected errors ['specialtypes_type.py:165:4 Incompatible variable type [9]: x1 is declared to have type `typing.Callable[..., typing.Any]` but is used as type `Type[typing.Any]`.'] -Line 166: Unexpected errors ['specialtypes_type.py:166:4 Incompatible variable type [9]: x2 is declared to have type `typing.Callable[[int, int], int]` but is used as type `Type[typing.Any]`.'] -""" diff --git a/conformance/results/pyre/tuples_type_compat.toml b/conformance/results/pyre/tuples_type_compat.toml deleted file mode 100644 index 7eb2392d..00000000 --- a/conformance/results/pyre/tuples_type_compat.toml +++ /dev/null @@ -1,46 +0,0 @@ -conformant = "Partial" -notes = """ -Does not support some unpacked tuple forms. -Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`. -Does not support tuple narrowing based on `len()` type guard (optional). -Does not correctly evaluate `Sequence[Never]` for `tuple[()]`. -""" -output = """ -tuples_type_compat.py:15:4 Incompatible variable type [9]: v2 is declared to have type `Tuple[int, int]` but is used as type `Tuple[float, complex]`. -tuples_type_compat.py:55:21 Undefined or invalid type [11]: Annotation `SomeType` is not defined as a type. -tuples_type_compat.py:73:11 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:75:8 Assert type [70]: Expected `Tuple[int]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:78:11 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:80:8 Assert type [70]: Expected `Union[Tuple[int, int], Tuple[str, str]]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:83:11 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:85:8 Assert type [70]: Expected `Tuple[int, str, int]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:101:12 Assert type [70]: Expected `Tuple[int]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:106:12 Assert type [70]: Expected `Union[Tuple[int, int], Tuple[str, str]]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:111:12 Assert type [70]: Expected `Tuple[int, str, int]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`. -tuples_type_compat.py:126:12 Assert type [70]: Expected `Tuple[Union[int, str], str]` but got `Tuple[Union[int, str], Union[int, str]]`. -tuples_type_compat.py:129:12 Assert type [70]: Expected `Tuple[Union[int, str], int]` but got `Tuple[Union[int, str], Union[int, str]]`. -tuples_type_compat.py:153:4 Assert type [70]: Expected `Sequence[Never]` but got `Sequence[Variable[T]]`. -tuples_type_compat.py:157:0 Incompatible variable type [9]: t1 is declared to have type `Tuple[int, str]` but is used as type `Tuple[int, str, str]`. -tuples_type_compat.py:162:0 Incompatible variable type [9]: t2 is declared to have type `typing.Tuple[int, *Tuple[str, ...]]` but is used as type `Tuple[int, int, str]`. -tuples_type_compat.py:163:0 Incompatible variable type [9]: t2 is declared to have type `typing.Tuple[int, *Tuple[str, ...]]` but is used as type `Tuple[int, str, int]`. -tuples_type_compat.py:169:0 Incompatible variable type [9]: t3 is declared to have type `typing.Tuple[int, *Tuple[str, ...], int]` but is used as type `Tuple[int, str, str]`. -tuples_type_compat.py:170:0 Incompatible variable type [9]: t3 is declared to have type `typing.Tuple[int, *Tuple[str, ...], int]` but is used as type `Tuple[int, str, str, float]`. -tuples_type_compat.py:175:0 Incompatible variable type [9]: t4 is declared to have type `typing.Tuple[*Tuple[str, ...], int]` but is used as type `Tuple[int, str, int]`. -tuples_type_compat.py:176:0 Incompatible variable type [9]: t4 is declared to have type `typing.Tuple[*Tuple[str, ...], int]` but is used as type `Tuple[str, str, float]`. -tuples_type_compat.py:181:4 Incompatible variable type [9]: t2 is declared to have type `Tuple[str, str, int]` but is used as type `Tuple[str, str]`. -tuples_type_compat.py:184:4 Incompatible variable type [9]: t5 is declared to have type `typing.Tuple[str, str, str, *Tuple[str, ...]]` but is used as type `Tuple[str, str]`. -tuples_type_compat.py:188:4 Incompatible variable type [9]: t9 is declared to have type `typing.Tuple[*Tuple[str, ...], str, str, str]` but is used as type `Tuple[str, str]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 32: Expected 1 errors -Line 33: Expected 1 errors -Line 43: Expected 1 errors -Line 62: Expected 1 errors -Line 55: Unexpected errors ['tuples_type_compat.py:55:21 Undefined or invalid type [11]: Annotation `SomeType` is not defined as a type.'] -Line 73: Unexpected errors ['tuples_type_compat.py:73:11 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`.'] -Line 78: Unexpected errors ['tuples_type_compat.py:78:11 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`.'] -Line 83: Unexpected errors ['tuples_type_compat.py:83:11 Incompatible parameter type [6]: In call `len`, for 1st positional argument, expected `pyre_extensions.PyreReadOnly[Sized]` but got `Union[Tuple[int], Tuple[str, str], typing.Tuple[int, *Tuple[str, ...], int]]`.'] -Line 153: Unexpected errors ['tuples_type_compat.py:153:4 Assert type [70]: Expected `Sequence[Never]` but got `Sequence[Variable[T]]`.'] -""" diff --git a/conformance/results/pyre/tuples_type_form.toml b/conformance/results/pyre/tuples_type_form.toml deleted file mode 100644 index 750fc795..00000000 --- a/conformance/results/pyre/tuples_type_form.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Pass" -output = """ -tuples_type_form.py:12:0 Incompatible variable type [9]: t1 is declared to have type `Tuple[int]` but is used as type `Tuple[int, int]`. -tuples_type_form.py:14:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[int, int]` but is used as type `Tuple[int]`. -tuples_type_form.py:15:0 Incompatible variable type [9]: t2 is declared to have type `Tuple[int, int]` but is used as type `Tuple[int, str]`. -tuples_type_form.py:25:0 Incompatible variable type [9]: t10 is declared to have type `Tuple[]` but is used as type `Tuple[int]`. -tuples_type_form.py:36:0 Incompatible variable type [9]: t20 is declared to have type `typing.Tuple[int, ...]` but is used as type `Tuple[int, int, int, str]`. -tuples_type_form.py:40:5 Invalid type [31]: Expression `tuple[(int, int, ...)]` is not a valid type. -tuples_type_form.py:41:5 Invalid type [31]: Expression `tuple[...]` is not a valid type. -tuples_type_form.py:42:5 Invalid type [31]: Expression `tuple[(..., int)]` is not a valid type. -tuples_type_form.py:43:5 Invalid type [31]: Expression `tuple[(int, ..., int)]` is not a valid type. -tuples_type_form.py:44:5 Invalid type [31]: Expression `tuple[(*tuple[str], ...)]` is not a valid type. -tuples_type_form.py:45:5 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], ...)]` is not a valid type. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/tuples_unpacked.toml b/conformance/results/pyre/tuples_unpacked.toml deleted file mode 100644 index b257b259..00000000 --- a/conformance/results/pyre/tuples_unpacked.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -tuples_unpacked.py:40:4 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], *tuple[(int, ...)])]` is not a valid type. -tuples_unpacked.py:41:4 Invalid type [31]: Expression `tuple[(*tuple[(str, *tuple[(str, ...)])], *tuple[(int, ...)])]` is not a valid type. -tuples_unpacked.py:51:8 Invalid type [31]: Expression `tuple[(*tuple[(str, ...)], *Ts)]` is not a valid type. -tuples_unpacked.py:59:5 Invalid type [31]: Expression `tuple[(typing.Unpack[tuple[(str, ...)]], typing.Unpack[tuple[(int, ...)]])]` is not a valid type. -tuples_unpacked.py:60:5 Invalid type [31]: Expression `tuple[(typing.Unpack[tuple[(str, typing.Unpack[tuple[(str, ...)]])]], typing.Unpack[tuple[(int, ...)]])]` is not a valid type. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_alt_syntax.toml b/conformance/results/pyre/typeddicts_alt_syntax.toml deleted file mode 100644 index 04257f60..00000000 --- a/conformance/results/pyre/typeddicts_alt_syntax.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Partial" -notes = """ -Does not report when name of TypedDict doesn't match assigned identifier name. -Does not support keyword-argument form of alternative syntax (deprecated in 3.11). -""" -output = """ -typeddicts_alt_syntax.py:23:16 Call error [29]: `object` is not a function. -typeddicts_alt_syntax.py:41:9 Call error [29]: `object` is not a function. -typeddicts_alt_syntax.py:43:8 Undefined or invalid type [11]: Annotation `Movie2` is not defined as a type. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 27: Expected 1 errors -Line 31: Expected 1 errors -Line 35: Expected 1 errors -Line 43: Unexpected errors ['typeddicts_alt_syntax.py:43:8 Undefined or invalid type [11]: Annotation `Movie2` is not defined as a type.'] -""" diff --git a/conformance/results/pyre/typeddicts_class_syntax.toml b/conformance/results/pyre/typeddicts_class_syntax.toml deleted file mode 100644 index 2dc3e959..00000000 --- a/conformance/results/pyre/typeddicts_class_syntax.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject methods within TypedDict class. -Does not report when metaclass is provided. -Does not report when other keyword argument is provided. -Does not support generic TypedDict class. -""" -output = """ -typeddicts_class_syntax.py:49:0 Unexpected keyword [28]: Unexpected keyword argument `other` to call `object.__init_subclass__`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 29: Expected 1 errors -Line 44: Expected 1 errors -Lines 33, 34: Expected error (tag 'method2') -Lines 38, 39: Expected error (tag 'method3') -""" diff --git a/conformance/results/pyre/typeddicts_extra_items.toml b/conformance/results/pyre/typeddicts_extra_items.toml deleted file mode 100644 index a1f9253c..00000000 --- a/conformance/results/pyre/typeddicts_extra_items.toml +++ /dev/null @@ -1,143 +0,0 @@ -conformant = "Unsupported" -notes = """ -Not supported. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 215: Expected 1 errors -Line 222: Expected 1 errors -Line 242: Expected 1 errors -Line 256: Expected 1 errors -Line 257: Expected 1 errors -Line 268: Expected 1 errors -Lines 91, 92: Expected error (tag 'MovieC') -Lines 94, 95: Expected error (tag 'MovieD') -Lines 184, 185: Expected error (tag 'MovieRequiredYear') -Lines 187, 188: Expected error (tag 'MovieNotRequiredYear') -Lines 196, 197: Expected error (tag 'BookWithPublisher') -Line 11: Unexpected errors ['typeddicts_extra_items.py:11:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 14: Unexpected errors ['typeddicts_extra_items.py:14:11 TypedDict initialization error [55]: TypedDict `Movie` has no field `novel_adaptation`.'] -Line 21: Unexpected errors ['typeddicts_extra_items.py:21:21 TypedDict initialization error [55]: TypedDict `MovieFunctional` has no field `novel_adaptation`.'] -Line 29: Unexpected errors ['typeddicts_extra_items.py:29:4 Assert type [70]: Expected `bool` but got `str`.', 'typeddicts_extra_items.py:29:22 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `novel_adaptation`.'] -Line 33: Unexpected errors ['typeddicts_extra_items.py:33:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 40: Unexpected errors ['typeddicts_extra_items.py:40:20 TypedDict initialization error [55]: TypedDict `InheritedMovie` has no field `other_extra_key`.'] -Line 55: Unexpected errors ['typeddicts_extra_items.py:55:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`.'] -Line 64: Unexpected errors ['typeddicts_extra_items.py:64:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`.'] -Line 70: Unexpected errors ['typeddicts_extra_items.py:70:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 82: Unexpected errors ['typeddicts_extra_items.py:82:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`.'] -Line 88: Unexpected errors ['typeddicts_extra_items.py:88:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`.'] -Line 100: Unexpected errors ['typeddicts_extra_items.py:100:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 103: Unexpected errors ['typeddicts_extra_items.py:103:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`.'] -Line 106: Unexpected errors ['typeddicts_extra_items.py:106:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 124: Unexpected errors ['typeddicts_extra_items.py:124:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 129: Unexpected errors ['typeddicts_extra_items.py:129:14 TypedDict accessed with a missing key [27]: TypedDict `MovieEI` has no key `year`.'] -Line 137: Unexpected errors ['typeddicts_extra_items.py:137:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 144: Unexpected errors ['typeddicts_extra_items.py:144:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `unpack_extra`.'] -Line 149: Unexpected errors ['typeddicts_extra_items.py:149:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 152: Unexpected errors ['typeddicts_extra_items.py:152:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 155: Unexpected errors ['typeddicts_extra_items.py:155:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 165: Unexpected errors ['typeddicts_extra_items.py:165:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 171: Unexpected errors ['typeddicts_extra_items.py:171:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 181: Unexpected errors ['typeddicts_extra_items.py:181:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 193: Unexpected errors ['typeddicts_extra_items.py:193:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 210: Unexpected errors ['typeddicts_extra_items.py:210:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 217: Unexpected errors ['typeddicts_extra_items.py:217:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 228: Unexpected errors ['typeddicts_extra_items.py:228:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 231: Unexpected errors ['typeddicts_extra_items.py:231:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 235: Unexpected errors ['typeddicts_extra_items.py:235:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 248: Unexpected errors ['typeddicts_extra_items.py:248:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 251: Unexpected errors ['typeddicts_extra_items.py:251:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 254: Unexpected errors ['typeddicts_extra_items.py:254:27 TypedDict initialization error [55]: TypedDict `MovieExtraInt` has no field `year`.'] -Line 255: Unexpected errors ['typeddicts_extra_items.py:255:27 TypedDict initialization error [55]: TypedDict `MovieExtraStr` has no field `description`.'] -Line 266: Unexpected errors ['typeddicts_extra_items.py:266:28 TypedDict initialization error [55]: TypedDict `MovieExtraInt` has no field `year`.'] -Line 280: Unexpected errors ['typeddicts_extra_items.py:280:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 284: Unexpected errors ['typeddicts_extra_items.py:284:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `ExtraMovie.__init__`.'] -Line 289: Unexpected errors ['typeddicts_extra_items.py:289:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`.'] -Line 299: Unexpected errors ['typeddicts_extra_items.py:299:28 TypedDict initialization error [55]: TypedDict `MovieExtraStr` has no field `summary`.'] -Line 300: Unexpected errors ['typeddicts_extra_items.py:300:0 Incompatible variable type [9]: str_mapping is declared to have type `Mapping[str, str]` but is used as type `MovieExtraStr`.'] -Line 302: Unexpected errors ['typeddicts_extra_items.py:302:28 TypedDict initialization error [55]: TypedDict `MovieExtraInt` has no field `year`.'] -Line 304: Unexpected errors ['typeddicts_extra_items.py:304:0 Incompatible variable type [9]: int_str_mapping is declared to have type `Mapping[str, Union[int, str]]` but is used as type `MovieExtraInt`.'] -Line 310: Unexpected errors ['typeddicts_extra_items.py:310:4 Assert type [70]: Expected `List[Tuple[str, Union[int, str]]]` but got `List[Tuple[str, object]]`.'] -Line 311: Unexpected errors ['typeddicts_extra_items.py:311:4 Assert type [70]: Expected `List[Union[int, str]]` but got `List[object]`.'] -Line 319: Unexpected errors ['typeddicts_extra_items.py:319:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`.'] -Line 326: Unexpected errors ['typeddicts_extra_items.py:326:4 Incompatible variable type [9]: v is declared to have type `Dict[str, int]` but is used as type `IntDict`.'] -Line 329: Unexpected errors ['typeddicts_extra_items.py:329:40 TypedDict initialization error [55]: TypedDict `IntDictWithNum` has no field `bar`.'] -Line 330: Unexpected errors ['typeddicts_extra_items.py:330:0 Incompatible variable type [9]: regular_dict is declared to have type `Dict[str, int]` but is used as type `IntDictWithNum`.'] -Line 337: Unexpected errors ['typeddicts_extra_items.py:337:0 Undefined attribute [16]: `IntDictWithNum` has no attribute `clear`.'] -Line 339: Unexpected errors ['typeddicts_extra_items.py:339:0 Assert type [70]: Expected `Tuple[str, int]` but got `typing.Any`.', 'typeddicts_extra_items.py:339:12 Undefined attribute [16]: `IntDictWithNum` has no attribute `popitem`.'] -Line 342: Unexpected errors ["typeddicts_extra_items.py:342:26 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('num')."] -Line 343: Unexpected errors ["typeddicts_extra_items.py:343:30 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('num')."] -""" -output = """ -typeddicts_extra_items.py:11:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:14:11 TypedDict initialization error [55]: TypedDict `Movie` has no field `novel_adaptation`. -typeddicts_extra_items.py:15:11 TypedDict initialization error [55]: TypedDict `Movie` has no field `year`. -typeddicts_extra_items.py:21:21 TypedDict initialization error [55]: TypedDict `MovieFunctional` has no field `novel_adaptation`. -typeddicts_extra_items.py:22:21 TypedDict initialization error [55]: TypedDict `MovieFunctional` has no field `year`. -typeddicts_extra_items.py:29:4 Assert type [70]: Expected `bool` but got `str`. -typeddicts_extra_items.py:29:22 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `novel_adaptation`. -typeddicts_extra_items.py:33:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:39:20 TypedDict initialization error [55]: Expected type `int` for `InheritedMovie` field `year` but got `None`. -typeddicts_extra_items.py:40:20 TypedDict initialization error [55]: TypedDict `InheritedMovie` has no field `other_extra_key`. -typeddicts_extra_items.py:49:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:55:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:64:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:67:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:70:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:73:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:82:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:88:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:100:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:103:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:106:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:109:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:114:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:117:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:124:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:128:4 Invalid TypedDict operation [54]: Cannot delete required field `name` from TypedDict `MovieEI`. -typeddicts_extra_items.py:129:14 TypedDict accessed with a missing key [27]: TypedDict `MovieEI` has no key `year`. -typeddicts_extra_items.py:137:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:143:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `unpack_no_extra`. -typeddicts_extra_items.py:144:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `unpack_extra`. -typeddicts_extra_items.py:149:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:152:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:155:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:165:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:171:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:174:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:181:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:193:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:210:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:217:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:228:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:231:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:235:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:248:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:251:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:254:27 TypedDict initialization error [55]: TypedDict `MovieExtraInt` has no field `year`. -typeddicts_extra_items.py:255:27 TypedDict initialization error [55]: TypedDict `MovieExtraStr` has no field `description`. -typeddicts_extra_items.py:266:28 TypedDict initialization error [55]: TypedDict `MovieExtraInt` has no field `year`. -typeddicts_extra_items.py:278:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `NonClosedMovie.__init__`. -typeddicts_extra_items.py:280:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:284:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `ExtraMovie.__init__`. -typeddicts_extra_items.py:285:0 Unexpected keyword [28]: Unexpected keyword argument `language` to call `ExtraMovie.__init__`. -typeddicts_extra_items.py:289:0 Unexpected keyword [28]: Unexpected keyword argument `closed` to call `object.__init_subclass__`. -typeddicts_extra_items.py:293:0 Unexpected keyword [28]: Unexpected keyword argument `year` to call `ClosedMovie.__init__`. -typeddicts_extra_items.py:299:28 TypedDict initialization error [55]: TypedDict `MovieExtraStr` has no field `summary`. -typeddicts_extra_items.py:300:0 Incompatible variable type [9]: str_mapping is declared to have type `Mapping[str, str]` but is used as type `MovieExtraStr`. -typeddicts_extra_items.py:302:28 TypedDict initialization error [55]: TypedDict `MovieExtraInt` has no field `year`. -typeddicts_extra_items.py:303:0 Incompatible variable type [9]: int_mapping is declared to have type `Mapping[str, int]` but is used as type `MovieExtraInt`. -typeddicts_extra_items.py:304:0 Incompatible variable type [9]: int_str_mapping is declared to have type `Mapping[str, Union[int, str]]` but is used as type `MovieExtraInt`. -typeddicts_extra_items.py:310:4 Assert type [70]: Expected `List[Tuple[str, Union[int, str]]]` but got `List[Tuple[str, object]]`. -typeddicts_extra_items.py:311:4 Assert type [70]: Expected `List[Union[int, str]]` but got `List[object]`. -typeddicts_extra_items.py:319:0 Unexpected keyword [28]: Unexpected keyword argument `extra_items` to call `object.__init_subclass__`. -typeddicts_extra_items.py:326:4 Incompatible variable type [9]: v is declared to have type `Dict[str, int]` but is used as type `IntDict`. -typeddicts_extra_items.py:329:40 TypedDict initialization error [55]: TypedDict `IntDictWithNum` has no field `bar`. -typeddicts_extra_items.py:330:0 Incompatible variable type [9]: regular_dict is declared to have type `Dict[str, int]` but is used as type `IntDictWithNum`. -typeddicts_extra_items.py:337:0 Undefined attribute [16]: `IntDictWithNum` has no attribute `clear`. -typeddicts_extra_items.py:339:0 Assert type [70]: Expected `Tuple[str, int]` but got `typing.Any`. -typeddicts_extra_items.py:339:12 Undefined attribute [16]: `IntDictWithNum` has no attribute `popitem`. -typeddicts_extra_items.py:342:26 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('num'). -typeddicts_extra_items.py:343:30 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('num'). -typeddicts_extra_items.py:352:4 Incompatible variable type [9]: int_dict is declared to have type `IntDict` but is used as type `Dict[str, int]`. -""" diff --git a/conformance/results/pyre/typeddicts_final.toml b/conformance/results/pyre/typeddicts_final.toml deleted file mode 100644 index 49994930..00000000 --- a/conformance/results/pyre/typeddicts_final.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Partial" -notes = """ -Does not handle value with literal type as index to TypedDict object. -""" -output = """ -typeddicts_final.py:26:17 Incompatible parameter type [6]: In call `TypedDictionary.__getitem__`, for 1st positional argument, expected `typing_extensions.Literal['name']` but got `Union[typing_extensions.Literal['name'], typing_extensions.Literal['year']]`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 26: Unexpected errors ["typeddicts_final.py:26:17 Incompatible parameter type [6]: In call `TypedDictionary.__getitem__`, for 1st positional argument, expected `typing_extensions.Literal['name']` but got `Union[typing_extensions.Literal['name'], typing_extensions.Literal['year']]`."] -""" diff --git a/conformance/results/pyre/typeddicts_inheritance.toml b/conformance/results/pyre/typeddicts_inheritance.toml deleted file mode 100644 index 5ac846af..00000000 --- a/conformance/results/pyre/typeddicts_inheritance.toml +++ /dev/null @@ -1,11 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -typeddicts_inheritance.py:44:30 Invalid inheritance [39]: `NonTypedDict` is not a valid parent class for a typed dictionary. Expected a typed dictionary or typing.Generic. -typeddicts_inheritance.py:54:0 Inconsistent override [15]: `x` overrides attribute defined in `X1` inconsistently. Type `int` is not a subtype of the overridden attribute `str`. -typeddicts_inheritance.py:65:0 Invalid inheritance [39]: Field `x` has type `int` in base class `X2` and type `str` in base class `Y2`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_operations.toml b/conformance/results/pyre/typeddicts_operations.toml deleted file mode 100644 index e8b1cf65..00000000 --- a/conformance/results/pyre/typeddicts_operations.toml +++ /dev/null @@ -1,19 +0,0 @@ -conformant = "Pass" -notes = """ -""" -output = """ -typeddicts_operations.py:22:16 Invalid TypedDict operation [54]: Expected `str` to be assigned to `Movie` field `name` but got `int`. -typeddicts_operations.py:23:16 Invalid TypedDict operation [54]: Expected `int` to be assigned to `Movie` field `year` but got `str`. -typeddicts_operations.py:24:6 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `other`. -typeddicts_operations.py:26:12 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `other`. -typeddicts_operations.py:28:8 TypedDict initialization error [55]: Missing required field `year` for TypedDict `Movie`. -typeddicts_operations.py:29:8 TypedDict initialization error [55]: Expected type `int` for `Movie` field `year` but got `float`. -typeddicts_operations.py:32:8 TypedDict initialization error [55]: TypedDict `Movie` has no field `other`. -typeddicts_operations.py:37:4 Incompatible variable type [9]: movie is declared to have type `Movie` but is used as type `Dict[str, Union[int, str]]`. -typeddicts_operations.py:47:0 Undefined attribute [16]: `Movie` has no attribute `clear`. -typeddicts_operations.py:49:0 Invalid TypedDict operation [54]: Cannot delete required field `name` from TypedDict `Movie`. -typeddicts_operations.py:62:0 Undefined attribute [16]: `MovieOptional` has no attribute `clear`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_readonly.toml b/conformance/results/pyre/typeddicts_readonly.toml deleted file mode 100644 index 2af32a98..00000000 --- a/conformance/results/pyre/typeddicts_readonly.toml +++ /dev/null @@ -1,12 +0,0 @@ -conformant = "Pass" -output = """ -typeddicts_readonly.py:24:16 Invalid TypedDict operation [54]: Cannot write to `Band` read-only field `members`. -typeddicts_readonly.py:36:16 Invalid TypedDict operation [54]: Cannot write to `Band2` read-only field `members`. -typeddicts_readonly.py:50:14 Invalid TypedDict operation [54]: Cannot write to `Movie1` read-only field `title`. -typeddicts_readonly.py:51:13 Invalid TypedDict operation [54]: Cannot write to `Movie1` read-only field `year`. -typeddicts_readonly.py:60:14 Invalid TypedDict operation [54]: Cannot write to `Movie2` read-only field `title`. -typeddicts_readonly.py:61:13 Invalid TypedDict operation [54]: Cannot write to `Movie2` read-only field `year`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_readonly_consistency.toml b/conformance/results/pyre/typeddicts_readonly_consistency.toml deleted file mode 100644 index 21056412..00000000 --- a/conformance/results/pyre/typeddicts_readonly_consistency.toml +++ /dev/null @@ -1,13 +0,0 @@ -conformant = "Pass" -output = """ -typeddicts_readonly_consistency.py:37:4 Incompatible variable type [9]: v3 is declared to have type `B1` but is used as type `A1`. -typeddicts_readonly_consistency.py:38:4 Incompatible variable type [9]: v4 is declared to have type `B1` but is used as type `C1`. -typeddicts_readonly_consistency.py:40:4 Incompatible variable type [9]: v5 is declared to have type `C1` but is used as type `A1`. -typeddicts_readonly_consistency.py:81:4 Incompatible variable type [9]: v3 is declared to have type `B2` but is used as type `A2`. -typeddicts_readonly_consistency.py:82:4 Incompatible variable type [9]: v4 is declared to have type `B2` but is used as type `C2`. -typeddicts_readonly_consistency.py:84:4 Incompatible variable type [9]: v5 is declared to have type `C2` but is used as type `A2`. -typeddicts_readonly_consistency.py:85:4 Incompatible variable type [9]: v6 is declared to have type `C2` but is used as type `B2`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_readonly_inheritance.toml b/conformance/results/pyre/typeddicts_readonly_inheritance.toml deleted file mode 100644 index abf96bda..00000000 --- a/conformance/results/pyre/typeddicts_readonly_inheritance.toml +++ /dev/null @@ -1,27 +0,0 @@ -conformant = "Unsupported" -output = """ -typeddicts_readonly_inheritance.py:36:13 Invalid TypedDict operation [54]: Cannot write to `Album2` read-only field `name`. -typeddicts_readonly_inheritance.py:47:0 Inconsistent override [15]: `alt` overrides attribute defined in `AlbumCollection` inconsistently. Type `typing.List[str]` is not a subtype of the overridden attribute `typing.List[typing.Union[int, str]]`. -typeddicts_readonly_inheritance.py:65:18 TypedDict initialization error [55]: Missing required field `name` for TypedDict `RequiredName`. -typeddicts_readonly_inheritance.py:82:13 Invalid TypedDict operation [54]: Expected `str` to be assigned to `User` field `ident` but got `int`. -typeddicts_readonly_inheritance.py:83:4 TypedDict initialization error [55]: Expected type `str` for `User` field `ident` but got `int`. -typeddicts_readonly_inheritance.py:84:4 TypedDict initialization error [55]: Missing required field `ident` for TypedDict `User`. -typeddicts_readonly_inheritance.py:93:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`. -typeddicts_readonly_inheritance.py:97:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`. -typeddicts_readonly_inheritance.py:105:0 Inconsistent override [15]: `c` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`. -typeddicts_readonly_inheritance.py:119:0 Invalid inheritance [39]: Field `x` has type `int` in base class `TD_A1` and type `float` in base class `TD_A2`. -typeddicts_readonly_inheritance.py:119:0 Invalid inheritance [39]: Field `y` has type `int` in base class `TD_A1` and type `float` in base class `TD_A2`. -typeddicts_readonly_inheritance.py:132:0 Invalid inheritance [39]: `y` is a required field in base class `TD_B1` and a non-required field in base class `TD_B2` (because of `total=False`). -typeddicts_readonly_inheritance.py:132:0 Invalid inheritance [39]: `x` is a required field in base class `TD_B2` and a non-required field in base class `TD_B1` (because of `total=False`). -""" -conformance_automated = "Fail" -errors_diff = """ -Line 50: Expected 1 errors -Line 94: Expected 1 errors -Line 98: Expected 1 errors -Line 106: Expected 1 errors -Line 47: Unexpected errors ['typeddicts_readonly_inheritance.py:47:0 Inconsistent override [15]: `alt` overrides attribute defined in `AlbumCollection` inconsistently. Type `typing.List[str]` is not a subtype of the overridden attribute `typing.List[typing.Union[int, str]]`.'] -Line 93: Unexpected errors ['typeddicts_readonly_inheritance.py:93:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`.'] -Line 97: Unexpected errors ['typeddicts_readonly_inheritance.py:97:0 Inconsistent override [15]: `a` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`.'] -Line 105: Unexpected errors ['typeddicts_readonly_inheritance.py:105:0 Inconsistent override [15]: `c` overrides attribute defined in `F1` inconsistently. Type `int` is not a subtype of the overridden attribute `int`.'] -""" diff --git a/conformance/results/pyre/typeddicts_readonly_kwargs.toml b/conformance/results/pyre/typeddicts_readonly_kwargs.toml deleted file mode 100644 index 0f1dddfb..00000000 --- a/conformance/results/pyre/typeddicts_readonly_kwargs.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ -typeddicts_readonly_kwargs.py:33:21 Invalid TypedDict operation [54]: Cannot write to `ReadOnlyArgs` read-only field `key1`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_readonly_update.toml b/conformance/results/pyre/typeddicts_readonly_update.toml deleted file mode 100644 index 46846324..00000000 --- a/conformance/results/pyre/typeddicts_readonly_update.toml +++ /dev/null @@ -1,7 +0,0 @@ -conformant = "Pass" -output = """ -typeddicts_readonly_update.py:23:10 Incompatible parameter type [6]: In call `TypedDictionary.update`, for 1st positional argument, cannot update read-only fields of `A`. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/typeddicts_required.toml b/conformance/results/pyre/typeddicts_required.toml deleted file mode 100644 index 923f2b19..00000000 --- a/conformance/results/pyre/typeddicts_required.toml +++ /dev/null @@ -1,17 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject use of `Required` in function parameter annotation. -Does not reject nested use of `Required` in type annotation. -Does not support recursive TypedDict definitions. -Incorrectly complains about uninitialized attributes on TypedDict definitions. -Incorrectly generates "attribute not initialized" errors for TypedDict fields. -""" -output = """ -typeddicts_required.py:12:4 Uninitialized attribute [13]: Attribute `x` is declared in class `NotTypedDict` to have type `Required[int]` but is never initialized. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 16: Expected 1 errors -Line 59: Expected 1 errors -Line 60: Expected 1 errors -""" diff --git a/conformance/results/pyre/typeddicts_type_consistency.toml b/conformance/results/pyre/typeddicts_type_consistency.toml deleted file mode 100644 index 124f691f..00000000 --- a/conformance/results/pyre/typeddicts_type_consistency.toml +++ /dev/null @@ -1,24 +0,0 @@ -conformant = "Partial" -notes = """ -Does not reject assignment of TypedDict with missing key. -Does not return non-Optional value from `get` method for required key. -Does not properly handle nested TypedDicts. -""" -output = """ -typeddicts_type_consistency.py:21:0 Incompatible variable type [9]: a1 is declared to have type `A1` but is used as type `B1`. -typeddicts_type_consistency.py:38:0 Incompatible variable type [9]: a2 is declared to have type `A2` but is used as type `B2`. -typeddicts_type_consistency.py:69:11 TypedDict initialization error [55]: TypedDict `A3` has no field `y`. -typeddicts_type_consistency.py:76:0 Incompatible variable type [9]: d1 is declared to have type `Dict[str, int]` but is used as type `B3`. -typeddicts_type_consistency.py:77:0 Incompatible variable type [9]: d2 is declared to have type `Dict[str, object]` but is used as type `B3`. -typeddicts_type_consistency.py:78:0 Incompatible variable type [9]: d3 is declared to have type `Dict[typing.Any, typing.Any]` but is used as type `B3`. -typeddicts_type_consistency.py:82:0 Incompatible variable type [9]: m1 is declared to have type `Mapping[str, int]` but is used as type `B3`. -typeddicts_type_consistency.py:101:0 Incompatible variable type [9]: name3 is declared to have type `str` but is used as type `Optional[str]`. -typeddicts_type_consistency.py:107:0 Incompatible variable type [9]: age4 is declared to have type `int` but is used as type `Union[str, int]`. -typeddicts_type_consistency.py:126:41 TypedDict initialization error [55]: Expected type `str` for `Inner1` field `inner_key` but got `int`. -typeddicts_type_consistency.py:152:0 Incompatible variable type [9]: o4 is declared to have type `Outer3` but is used as type `Outer2`. -""" -conformance_automated = "Fail" -errors_diff = """ -Line 65: Expected 1 errors -Line 152: Unexpected errors ['typeddicts_type_consistency.py:152:0 Incompatible variable type [9]: o4 is declared to have type `Outer3` but is used as type `Outer2`.'] -""" diff --git a/conformance/results/pyre/typeddicts_usage.toml b/conformance/results/pyre/typeddicts_usage.toml deleted file mode 100644 index 1699d6be..00000000 --- a/conformance/results/pyre/typeddicts_usage.toml +++ /dev/null @@ -1,15 +0,0 @@ -conformant = "Pass" -notes = """ -Does not report errant use of TypedDict in `isinstance` call. -Does not reject use of TypedDict as TypeVar bound. -""" -output = """ -typeddicts_usage.py:23:6 TypedDict accessed with a missing key [27]: TypedDict `Movie` has no key `director`. -typeddicts_usage.py:24:16 Invalid TypedDict operation [54]: Expected `int` to be assigned to `Movie` field `year` but got `str`. -typeddicts_usage.py:28:16 TypedDict initialization error [55]: Missing required field `name` for TypedDict `Movie`. -typeddicts_usage.py:35:21 TypedDict used in isinstance [71]: TypedDict classes may not be used for instance checks. -typeddicts_usage.py:40:0 Undefined or invalid type [11]: Annotation `TypedDict` is not defined as a type. -""" -conformance_automated = "Pass" -errors_diff = """ -""" diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml deleted file mode 100644 index 9c24e341..00000000 --- a/conformance/results/pyre/version.toml +++ /dev/null @@ -1,2 +0,0 @@ -version = "pyre 0.9.25" -test_duration = 10.27 diff --git a/conformance/results/pyrefly/directives_deprecated.toml b/conformance/results/pyrefly/directives_deprecated.toml index 2b371826..913e327b 100644 --- a/conformance/results/pyrefly/directives_deprecated.toml +++ b/conformance/results/pyrefly/directives_deprecated.toml @@ -5,8 +5,6 @@ Line 18: Expected 1 errors Line 24: Expected 1 errors Line 25: Expected 1 errors Line 30: Expected 1 errors -Line 41: Expected 1 errors -Line 42: Expected 1 errors Line 44: Expected 1 errors Line 47: Expected 1 errors Line 48: Expected 1 errors @@ -15,4 +13,6 @@ Line 69: Expected 1 errors Line 98: Expected 1 errors """ output = """ +ERROR directives_deprecated.py:41:5-13: `+` is not supported between `Spam` and `Literal[1]` [unsupported-operation] +ERROR directives_deprecated.py:42:1-10: `+=` is not supported between `Spam` and `Literal[1]` [unsupported-operation] """ diff --git a/conformance/results/pyrefly/enums_member_values.toml b/conformance/results/pyrefly/enums_member_values.toml index 135c7a1b..e90c4678 100644 --- a/conformance/results/pyrefly/enums_member_values.toml +++ b/conformance/results/pyrefly/enums_member_values.toml @@ -8,7 +8,7 @@ ERROR enums_member_values.py:22:12-41: assert_type(int, Literal[1]) failed [asse ERROR enums_member_values.py:26:16-50: assert_type(int, Literal[1, 3]) failed [assert-type] ERROR enums_member_values.py:30:16-51: assert_type(int, Literal[1, 2, 3]) failed [assert-type] ERROR enums_member_values.py:54:12-46: assert_type(Any, Literal[1]) failed [assert-type] -ERROR enums_member_values.py:68:12-42: assert_type(auto, Literal[1]) failed [assert-type] +ERROR enums_member_values.py:68:12-42: assert_type(int, Literal[1]) failed [assert-type] ERROR enums_member_values.py:78:5-10: Enum member `GREEN` has type `str`, must match the `_value_` attribute annotation of `int` [bad-assignment] ERROR enums_member_values.py:85:24-29: `int` is not assignable to attribute `_value_` with type `str` [bad-assignment] """ diff --git a/conformance/results/pyrefly/overloads_definitions.toml b/conformance/results/pyrefly/overloads_definitions.toml index 302bc4a2..6894d760 100644 --- a/conformance/results/pyrefly/overloads_definitions.toml +++ b/conformance/results/pyrefly/overloads_definitions.toml @@ -1,16 +1,9 @@ -conformant = "Partial" -notes = """ -Does not restrict some decorators to implementation -Does not require some decorators that need to appear on every overload -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 49: Unexpected errors ['Overloaded function must have an implementation [invalid-overload]'] """ output = """ ERROR overloads_definitions.py:16:5-10: Overloaded function needs at least two @overload declarations [invalid-overload] ERROR overloads_definitions.py:28:5-10: Overloaded function must have an implementation [invalid-overload] -ERROR overloads_definitions.py:49:9-14: Overloaded function must have an implementation [invalid-overload] ERROR overloads_definitions.py:59:9-21: Overloaded function must have an implementation [invalid-overload] ERROR overloads_definitions.py:81:9-14: If `@staticmethod` is present on any overload or the implementation, it should be on every overload and the implementation. [invalid-overload] ERROR overloads_definitions.py:90:9-14: If `@classmethod` is present on any overload or the implementation, it should be on every overload and the implementation. [invalid-overload] diff --git a/conformance/results/pyrefly/overloads_evaluation.toml b/conformance/results/pyrefly/overloads_evaluation.toml index 2d0abc7c..22aa1792 100644 --- a/conformance/results/pyrefly/overloads_evaluation.toml +++ b/conformance/results/pyrefly/overloads_evaluation.toml @@ -1,22 +1,9 @@ -conformant = "Partial" -notes = """ -Does not exclude overloads based on arity first -Does not perform argument expansion -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 234: Unexpected errors ['assert_type(str, int) failed [assert-type]'] -Line 264: Unexpected errors ['assert_type(list[int], Any) failed [assert-type]'] -Line 280: Unexpected errors ['assert_type(list[int], Any) failed [assert-type]'] -Line 345: Unexpected errors ['assert_type(list[int], Any) failed [assert-type]'] """ output = """ ERROR overloads_evaluation.py:38:11-13: No matching overload found for function `example1_1` [no-matching-overload] ERROR overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` [no-matching-overload] ERROR overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` [no-matching-overload] ERROR overloads_evaluation.py:115:13-22: No matching overload found for function `example2` [no-matching-overload] -ERROR overloads_evaluation.py:234:16-27: assert_type(str, int) failed [assert-type] -ERROR overloads_evaluation.py:264:16-27: assert_type(list[int], Any) failed [assert-type] -ERROR overloads_evaluation.py:280:16-34: assert_type(list[int], Any) failed [assert-type] -ERROR overloads_evaluation.py:345:16-27: assert_type(list[int], Any) failed [assert-type] """ diff --git a/conformance/results/pyrefly/typeddicts_inheritance.toml b/conformance/results/pyrefly/typeddicts_inheritance.toml index 1e3dd727..0da00046 100644 --- a/conformance/results/pyrefly/typeddicts_inheritance.toml +++ b/conformance/results/pyrefly/typeddicts_inheritance.toml @@ -1,12 +1,8 @@ -conformant = "Partial" -notes = """ -Does not check against inconsistent multiple inheritance -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 65: Expected 1 errors """ output = """ ERROR typeddicts_inheritance.py:44:7-19: `NonTypedDict` is not a typed dictionary. Typed dictionary definitions may only extend other typed dictionaries. [invalid-inheritance] ERROR typeddicts_inheritance.py:55:4-5: Class member `Y1.x` overrides parent class `X1` in an inconsistent manner [bad-override] +ERROR typeddicts_inheritance.py:65:7-11: Field `x` has inconsistent types inherited from multiple base classes [inconsistent-inheritance] """ diff --git a/conformance/results/pyrefly/version.toml b/conformance/results/pyrefly/version.toml index 5542fe39..b7e81919 100644 --- a/conformance/results/pyrefly/version.toml +++ b/conformance/results/pyrefly/version.toml @@ -1 +1 @@ -version = "pyrefly 0.36.2" +version = "pyrefly 0.37.0" diff --git a/conformance/results/results.html b/conformance/results/results.html index 7a657621..c632a117 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -162,14 +162,12 @@

Python Type System Conformance Test Results

pyright 1.1.406
-
pyre 0.9.25
-
zuban 0.1.0
-
pyrefly 0.36.2
+
pyrefly 0.37.0
- + Type annotations      annotations_coroutines @@ -177,26 +175,22 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      annotations_forward_refs
Partial

Does not report error for a forward reference that is not enclosed in quotes.

Does not report error for use of quoted type with "|" operator (runtime error).

Incorrectly generates error for quoted type defined in class scope.

Pass -
Partial

Does not report error for a forward reference that is not enclosed in quotes.

Does not report error for use of quoted type with "|" operator (runtime error).

Does not reject f-string in quoted type annotation.

Incorrectly generates error for quoted type defined in class scope.

Does not generate error for unquoted type defined in class scope.

Does not treat triple-quoted forward reference annotation as implicitly parenthesized.

Partial

Does not report error for a forward reference that is not enclosed in quotes.

Incorrectly generates error for quoted type defined in class scope.

Does not ignore newlines in multi-line unions

Partial

Types in quotes incorrectly refer to shadowing class member.

Does not reject some type forms that require quotes.

     annotations_generators
Partial

Does not report incompatible Generator type in `yield from` statement.

Pass -
Partial

Does not report invalid return type for generator when function implicitly returns None.

Incorrectly evaluates type of call to async generator.

Pass
Partial

Does not detect that invalid yield is unreachable

     annotations_methods
Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

-
Pass*

Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.

Pass Pass @@ -205,9 +199,8 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass - + Special types in annotations      specialtypes_any @@ -215,12 +208,10 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      specialtypes_never Pass Pass -
Partial

Does not treat Never as compatible with all other types.

Pass
Partial

Does not detect invalid return is unreachable

@@ -229,71 +220,61 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      specialtypes_promotions Pass Pass -
Partial

Does not reject use of attribute that is compatible only with float.

Pass Pass      specialtypes_type
Partial

Does not treat `type` same as `type[Any]` for assert_type.

Does not allow access to unknown attributes from object of type `type[Any]`.

Pass -
Partial

Does not reject Callable when passed to type[T].

Does not treat `type` same as `type[Any]` for assert_type.

Does not allow access to unknown attributes from object of type `type[Any]`.

Does not reject access to unknown attributes from object of type `Type[object]`.

Reports type incompatibility between `type` and `Callable[..., Any]`.

Pass
Partial

Does not implement all typing rules for type/type[]

- + Generics      generics_base_class
Partial

Does not detect inconsistent type variable ordering.

Pass -
Partial

Does not reject illegal use of Generic.

Does not allow using generic in assert_type expression.

Does not detect inconsistent type variable ordering.

Partial

Does not detect inconsistent type variable ordering in multi-inheritance.

Partial

Does not reject inconsistent ordering of type variables in different base classes.

     generics_basic Pass Pass -
Partial

False positives in examples using constrained type variables.

False negative for constraint parameterized by a type variable.

False negative in custom map example.

False positive using `iter`.

False negative for bad type arguments to Generic/Protocol.

False negative for generic metaclass.

Pass
Partial

Does not reject Type Var definition with only 1 constraint

Incorrect rejects + between two AnyStr

Constrained type var resolves to subtype instead of explcitly listed constraint

     generics_defaults Partial Pass -
Unsupported

Does not support generic defaults.

Partial

Does not reject TypeVars with defaults after a TypeVarTuple

Type parameter defaults are not bound by attribute access

ParamSpec after TypeVarTuple is not always handled correctly

Partial

Defaults are not bound by attribute access

     generics_defaults_referential Partial Pass -Unsupported Pass Unsupported      generics_defaults_specialization Partial Pass -
Unsupported

Does not support generic defaults.

Pass Pass      generics_paramspec_basic Pass Pass -
Partial

Does not enforce name consistency for ParamSpec assigned to identifier.

Incorrectly reports error for legitimate use of ParamSpec in generic type alias.

Does not reject ParamSpec when used in various invalid locations.

Pass Pass      generics_paramspec_components Pass Pass -
Partial

Does not report illegal use of "P.args" on normal parameter.

Does not report error when P.args is specified but P.kwargs is missing.

Does not report error when P is out of scope and P.args and P.kwargs is used.

Does not report error when calling callback defined with ParamSpec with incorrect arguments.

Does not report error when keyword argument is specified between P.args and P.kwargs.

Does not report error when calling callable and argument is missing for concatenated parameters.

Pass
Partial

Does not reject usage of args/kwargs for out-of-scope ParamSpec

@@ -302,131 +283,112 @@

Python Type System Conformance Test Results

Pass*

Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed).

Pass Pass -Pass      generics_paramspec_specialization Pass Pass -
Partial

Reports error for legitimate use of `...` to specialize ParamSpec

Pass Pass      generics_scoping Pass Pass -
Partial

False negative on generic class nested within generic function with same type variable.

False negative on generic class nested within generic class with same type variable.

False negative on assert_type uses.

Partial

False negative on generic class nested within generic class with same type variable.

Partial

Does not implement several scoping checks/restrictions for generics

     generics_self_advanced
Partial

Does not infer the type of an unannotated `self` parameter to be type `Self`.

Does not retain `Self` when calling method that returns `Self`.

Does not infer the type of an unannotated `cls` parameter to be type `type[Self]`.

Does not retain `Self` when accessing attribute through `type[Self]`.

Pass -
Partial

Does not handle use of `Self` within class body correctly.

False negatives on assert_type uses.

Partial

Doesn't allow accessing `Self` in a classmethod

Pass*

Treats attributes not initialized on the class as instance-only

     generics_self_attributes Pass Pass -
Unsupported

Does not understand `Self` type.

Pass Pass      generics_self_basic Pass Pass -
Partial

Does not handle use of `Self` as a generic type.

Pass
Partial

Return annotation of Self allows returning the concrete instance of the current class.

     generics_self_protocols Pass Pass -
Partial

Does not reject protocol compatibility due to method `Self` return type.

Pass Pass      generics_self_usage Pass Pass -
Partial

Complains in some cases when `self: Self` is used explicitly.

Does not complain when `Self` is used on a function outside any class definition.

Does not complain when `self` is annotated explicitly (without `Self`) and `Self` is returned.

Does not complain on inheritance involving `Self`.

Does not complain on use of `Self` in static methods.

Does not complain on use of `Self` in metaclasses.

Partial

Does not detect invalid Self when Self is not properly bound

Partial

Does not implement some restrictions on where Self can be used

     generics_syntax_compatibility Pass Pass -
Partial

False negative on mixing legacy and PEP695 syntax.

Does not detect mixing legacy and PEP695 syntax in methods.

Pass Pass      generics_syntax_declarations Pass Pass -
Partial

Does not detect incorrect use of legacy style syntax mixed with PEP695 syntax.

False negatives due to assert_type use.

Pass Pass      generics_syntax_infer_variance
Unsupported

Type parameter syntax not yet support.

Pass -
Partial

Incorrectly determines that a class cannot be instantiated with __getitem__.

Incorrectly handles mixing legacy and PEP695 syntax.

Partial

Final is handled a bit different (questionable if this is an issue)

Pass      generics_syntax_scoping
Partial

Does not following runtime scoping rules for type parameters in all cases.

Pass -
Partial

Does not properly handle mixing legacy syntax with PEP695 syntax.

Partial

Does not following runtime scoping rules for type parameters in all cases.

Partial

Does not implement some scoping restrictions for PEP695 generic syntax

     generics_type_erasure
Partial

Infers Node[Never] instead of Node[Any] when argument is not provided.

False negative on instance attribute access on type(node).

Pass -
Partial

Does not erase unspecified type variables to `Any` prior to `assert_type` handling.

False negatives on instance attribute access on the type.

Does not infer type of `DefaultDict` with explicit type parameters on constructor.

False negatives on assert_type uses.

Partial

Infers Node[Never] instead of Node[Any] when argument is not provided.

Pass      generics_typevartuple_args
Partial

Does not enforce that tuples captured by TypeVarTuple are same type.

Pass -
Partial

Does not property handle TypeVarTuple.

Partial

Does not enforce that tuples captured by TypeVarTuple are same type.

Pass      generics_typevartuple_basic
Partial

Does not enforce that tuples captured by TypeVarTuple are same length.

Does not enforce that tuples captured by TypeVarTuple are same type.

Pass -
Partial

Does not support TypeVarTuple.

False negatives due to assert_type.

Partial

Does not enforce that tuples captured by TypeVarTuple are same length.

Does not enforce that tuples captured by TypeVarTuple are same type.

Partial

TypeVarTuple is pinned too early when calling generic function

     generics_typevartuple_callable Pass Pass -
Partial

False negatives due to assert_type.

Pass Pass      generics_typevartuple_concat Pass Pass -
Partial

False negatives due to assert_type.

False compatability error message.

Pass
Partial

Fails to handle move_first_element_to_last example

     generics_typevartuple_overloads Pass Pass -
Unsupported

Does not support star expressions for `Unpack`.

Pass Pass      generics_typevartuple_specialization
Partial

Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided.

Rejects specialization of generic type alias defined as a tuple containing a TypeVar.

Pass -
Unsupported

Does not support star expressions for `Unpack`.

Pass
Partial

Sometimes specializes to tuple[Any, ...] instead of empty tuple

@@ -435,60 +397,52 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      generics_upper_bound
Partial

Does not reject use of type variable within an upper bound.

Pass -
Partial

False positives on valid type expression (`list[T]`) in `bound`.

Does not complain when bound is used alongside type constraints.

Partial

Does not reject use of type variable within an upper bound.

Pass      generics_variance
Partial

Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible.

Pass -
Partial

Does not reject a TypeVar that is defined as both covariant and contravariant.

Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible.

Partial

Does not reject use of class-scoped TypeVar used in a base class when variance is incompatible.

Unsupported      generics_variance_inference Pass Pass -
Partial

Does not properly handle mixing legacy and PEP695 syntax.

False negative about a type variable not being present in the function's parameters.

Pass Pass - + Type qualifiers      qualifiers_annotated
Partial

Does not allow ClassVar to be nested within Annotated.

Does not allow Final to be nested within Annotated.

Does not allow Required and NotRequired to be nested within Annotated.

Does not reject type[T] compatibility for type alias defined with Annotated.

Does not reject call of type alias defined with Annotated.

Pass -
Partial

Does not reject Annotated with a single parameter.

Does not reject call of Annotated with no type arguments.

Pass
Partial

Allows Annotated in some contexts where it should not be allowed

     qualifiers_final_annotation
Partial

Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition.

Does not allow conditional assignment of Final instance variable in __init__ method.

Does not allow redefinition of private class variable that is marked Final in parent class.

Does not report modification of local Final variable via "for" statement.

Pass -
Partial

Does not report Final variable with missing initialization in module scope.

Does not report error for invalid nesting of Final and ClassVar.

Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition.

Does not reject modification of imported variable declared Final.

Partial

Does not treat use of Final name as if it was replaced by the literal in NamedTuple definition.

Does not allow conditional assignment of Final instance variable in __init__ method.

Partial

Final attributes not initialized on the class can be assigned to

     qualifiers_final_decorator Pass Pass -
Partial

Reports error for overloaded method implementation marked @final if its overloads do not.

Does not report error for overloaded @final method defined in stub file.

Reports misleading error when overload is marked @final but implementation is not.

Pass Pass - + Class type compatibility      classes_classvar
Partial

Internal error if TypeVarTuple is used in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Rejects ClassVar nested in Annotated.

Does not reject use of ClassVar in TypeAlias definition.

Pass -
Partial

Does not reject use of TypeVar in ClassVar.

Does not reject use of ParamSpec in ClassVar.

Does not reject use of ClassVar as a generic type argument.

Does not reject use of ClassVar in parameter type annotation.

Does not reject use of ClassVar in local variable annotation.

Does not reject use of ClassVar in instance variable annotation.

Does not reject use of ClassVar in return type annotation.

Does not reject use of ClassVar in type alias definition.

Does not infer type from initialization for bare ClassVar.

Pass Pass @@ -497,50 +451,43 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass - + Type aliases      aliases_explicit
Partial

Does not reject specialization of type alias that has already been implicitly specialized.

Pass -
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

Incorrectly evaluates generic type alias with ParamSpec with missing type argument.

Does not report some illegal annotation forms as invalid type aliases.

Does not report invalid specialization of generic type aliases.

Incorrectly rejects import alias of `TypeAlias` when used to define type alias.

Does not report invalid specialization of already-specialized generic type alias.

Pass Pass      aliases_implicit Pass Pass -
Partial

Incorrectly reports error for type alias defined with ParamSpec.

Incorrectly rejects some valid type aliases when used in annotations.

Incorrectly evaluates generic type alias with ParamSpec with missing type argument.

Does not report invalid specialization of generic type aliases.

Does not report error for attempt to instantiate union type alias.

Does not report invalid specialization of already-specialized generic type alias.

Pass
Partial

Does not reject invalid syntax in implicit type aliases.

     aliases_newtype
Partial

`NewType`s are incorrectly considered to be classes.

Pass -
Partial

Does not reject use of NewType in `isinstance` call.

Does not reject use of NewType in class definition statement.

Does not report inconsistency between name of NewType and assigned identifier name.

Does not reject use of NewType with generic class with TypeVar.

Does not reject use of NewType with protocol class.

Does not reject use of NewType with TypedDict class.

Does not reject use of NewType with Any.

Pass Pass      aliases_recursive Pass Pass -
Partial

Does not properly handle some recursive type aliases.

Does not properly handle specialization of generic recursive type aliases.

Pass Unsupported      aliases_type_statement
Partial

Does not reject type alias defined in function scope.

Pass -
Partial

Does not complain when a type alias cannot be used as a base class.

Does not complain when a type alias cannot be used as a function.

Does not complain when a type statement definition combines new and old TypeVars.

Does not complain when a type statement definition uses old TypeVars.

Does not properly support recursive aliases.

Pass
Partial

Does not reject type alias defined with type statement in base class list

Does not reject redeclaration of type alias with the same name.

Does not detect circular definitions.

     aliases_typealiastype
Partial

Incorrectly rejects some recursive type aliases using TypeAliasType.

Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.

Pass -
Unsupported

Support for TypeAliasType is not implemented.

Partial

Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.

Incorrectly allows type_params= to be an arbitrary tuple.

Unsupported @@ -548,30 +495,26 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass Unsupported - + Literals      literals_interactions
Partial

Does not narrow type of `x` with `x in Literal` type guard pattern.

Pass -
Partial

Does not detect out-of-bound tuple literal index.

Does not perform exhaustiveness checks on enums.

Does not narrow type of `x` with `x in Literal` type guard pattern.

Does not narrow type of `x` with `x == Literal` type guard pattern.

Partial

Does not narrow type of `x` with `x in Literal` type guard pattern.

Partial

Two instances parameterized with different literals are not compatible

     literals_literalstring
Unsupported

Support for `LiteralString` is not implemented.

Pass -
Partial

Incorrectly infers `str` rather than `LiteralString` when literal string `join` is used.

Pass Pass      literals_parameterizations
Partial

Does not reject tuple within Literal.

Pass -
Partial

Does not support type aliases in Literal type expression.

Does not support nested Literal type expression.

Does not reject tuple in Literal type expression.

Does not reject "bare" Literal in type expression.

Pass Pass @@ -580,36 +523,31 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass - + Protocols      protocols_class_objects Pass Pass -
Partial

Does not reject protocol class assigned to type[Proto].

Incorrectly reports some class objects as incompatible with a protocol.

Fails to report some class objects as incompatible with a protocol.

Pass
Partial

Does not require concrete classes to be passed to type[Proto]

     protocols_definition
Partial

Does not detect protocol mismatch if concrete method is missing annotations.

Does not detect protocol mismatch if concrete method's parameters are position-only.

Pass -
Partial

Does not reject ClassVar in concrete class when attribute in protocol is not ClassVar or vice versa.

Does not reject read-only property in concrete class when attribute in protocol is mutable.

Does not reject covariant attribute type when protocol attribute is mutable.

Does not reject read-only property in concrete class when protocol has settable property.

Does not reject immutable named tuple attribute in concrete class when protocol attribute is mutable.

Does not reject immutable frozen dataclass attribute in concrete class when protocol attribute is mutable.

Partial

Does not detect protocol mismatch if concrete method is missing annotations.

Does not detect protocol mismatch if concrete method's parameters are position-only.

Partial

Allows attributes defined by assignment via self in Protocols

Incorrectly handles some ClassVar examples in Protocol subtyping

     protocols_explicit
Pass*

Does not report unimplemented attributes for class that explicitly derives from protocol until it is instantiated.

Pass -
Partial

Does not report error when calling unimplemented protocol method from derived class.

Does not report error when method is not implemented in derived class.

Pass
Unsupported

Does not check against abstract class instantiations

     protocols_generic Pass Pass -
Partial

Does not reject the use of Protocol and Generic together as base classes.

Does not detect protocol mismatch when method-scoped TypeVar is used in protocol.

Pass Pass @@ -618,12 +556,10 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      protocols_modules Pass Pass -
Unsupported

Does not perform protocol checks for modules.

Pass
Partial

Fails one subtyping example of protocol modules

@@ -632,12 +568,10 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      protocols_runtime_checkable
Partial

Does not report unsafe overlap for runtime_checkable protocol.

Pass -
Unsupported

Does not reject isinstance or issubclass call for protocol that is not runtime_checkable.

Does not reject issubclass call for data protocol.

Does not report unsafe overlap for runtime_checkable protocol.

Partial

Does not report unsafe overlap for runtime_checkable protocol.

Partial

Does not check for unsafe overlap in runtime_checkable protocols

@@ -646,29 +580,25 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      protocols_subtyping Pass Pass Pass Pass -Pass      protocols_variance Pass Pass -
Unsupported

Does not detect incorrect TypeVar variance within generic protocols.

Pass Unsupported - + Callables      callables_annotation
Partial

Incorrectly treats "*args: T, **kwargs: T" as "..." when T is specialized to Any.

Does not treat "*args: Any, **kargs: Any" as "..." when separated by keyword parameter.

Pass -
Partial

Does not evaluate correct type for `*args: int` parameter.

Does not correctly implement type compatibility rules for "...".

Does not treat "*args: Any, **kwargs: Any" as "...".

Partial

Incorrectly treats "*args: T, **kwargs: T" as "..." when T is specialized to Any.

Does not treat "*args: Any, **kargs: Any" as "..." when separated by keyword parameter.

Partial

Parameter names are lost when resolving ParamSpec

@@ -677,68 +607,59 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      callables_protocol Pass Pass -
Partial

Does not correctly handle callback protocol that declares attributes in all functions.

Does not report type incompatibility for callback protocol with positional-only parameters.

Incorrectly reports type compatibility error with callback that has *args and **kwargs.

Does not report type incompatibility for callback missing a default argument for positional parameter.

Does not report type incompatibility for callback missing a default argument for keyword parameter.

Pass Pass      callables_subtyping Pass Pass -
Partial

Rejects standard parameter as incompatible with keyword-only parameter.

Rejects use of Callable with ParamSpec in TypeAlias definition.

Pass Pass - + Constructors      constructors_call_init
Partial

Does not report errors during binding to self parameter of __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Pass -
Partial

Does not infer type of Self for self parameter of __init__ method.

Does not report errors during binding to self parameter of __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Incorrectly raises Incompatible overload type errors.

Incorrectly raises compatibility type errors.

Partial

Does not report errors during binding to self parameter of __init__ method.

Does not reject use of class-scoped type variables in annotation of self parameter in __init__ method.

Partial

Does not reject class-scoped type var in self param annotation

     constructors_call_metaclass
Unupported

Does not honor metaclass __call__ method when evaluating constructor call.

Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class.

Pass -
Partial

Does not evaluate __new__ if metaclass __call__ is defined.

Pass Pass      constructors_call_new
Partial

Does not support __new__ return type that is not a subclass of the class being constructed.

Does not skip evaluation of __init__ based on __new__ return type.

Does not report errors during binding to cls parameter of __new__ method.

Pass -
Partial

Does not support __new__ return type that is not a subclass of the class being constructed.

Does not report errors during binding to cls parameter of __new__ method.

Incorrectly raises compatibility type errors.

Partial

Does not support __new__ return type that is not a subclass of the class being constructed.

Does not skip evaluation of __init__ based on __new__ return type.

Does not report errors during binding to cls parameter of __new__ method.

Pass      constructors_call_type
Partial

Does not validate call to custom metaclass __call__ method through type[T].

Pass -Pass
Partial

Does not validate call to custom metaclass __call__ method through type[T].

Partial

Does not check TypeVar type constructor using upper bound's __new__

     constructors_callable
Partial

Does not generate a union type for __new__ and __init__ when converting class to callable.

Does not ignore __init__ based on __new__ return type when converting class to callable.

Does not support __new__ return type that is different from class being constructed.

Pass -
Partial

Does not generate a union type for __new__ and __init__ when converting class to callable.

Does not ignore __init__ based on __new__ return type when converting class to callable.

Does not support __new__ return type that is different from class being constructed.

Does not use annotated type of self in __init__ method to generate return type of callable.

Incorrectly raises incompatibility type errors.

Partial

Does not generate a union type for __new__ and __init__ when converting class to callable.

Does not ignore __init__ based on __new__ return type when converting class to callable.

Does not support __new__ return type that is different from class being constructed.

Struggles with some cases of self types

Partial

Some overloaded constructors are not resolved correctly.

Converting constructor to callable does not preserve class-scoped type params.

Converting constructor to callable does not substitute Self in __new__

Converting constructor to callable uses __new__ signature instead of __init__

     constructors_consistency
Pass*

Does not report inconsistency between __new__ and __init__ (optional).

Pass -
Pass*

Does not report inconsistency between __new__ and __init__ (optional).

Pass Pass - + Overloads      overloads_basic @@ -746,60 +667,52 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      overloads_consistency Pass Pass -
Partial

Does not apply decorator transforms before checking overload consistency.

Pass Pass      overloads_definitions
Partial

Allows @override to be on all overloads and implementation, instead of just implementation.

Pass -
Partial

Does not allow an overload with no implementation in a Protocol or an abstract base class.

Expects @final/@override on all overloads and implementation, instead of implementation only.

Pass -
Partial

Does not restrict some decorators to implementation

Does not require some decorators that need to appear on every overload

+Pass      overloads_definitions_stub
Partial

Allows @override to appear in a stub file not on the first overload.

Pass -
Partial

Expects @final and @override to be present on all overloads, not just first.

Pass Pass      overloads_evaluation
Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

Does not evaluate Any in some cases where overload is ambiguous.

Evaluates Any in some cases where overload is not ambiguous.

Partial

Does not evaluate Any in some cases where overload is ambiguous.

-
Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand type[A | B] to type[A] and type[B].

Does not expand tuple arguments to possible combinations.

Does not prefer variadic match to indeterminate-length unpacked argument.

Does not treat multiple matches due to gradual types as ambiguous.

Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

Does not evaluate Any in some cases where overload is ambiguous.

Evaluates Any in some cases where overload is not ambiguous.

-
Partial

Does not exclude overloads based on arity first

Does not perform argument expansion

+Pass - + Exceptions      exceptions_context_managers Pass Pass -
Partial

assert_type causes failures.

Pass
Partial

Some error suppressing context managers are not detected

- + Dataclasses      dataclasses_descriptors
Partial

Does not correctly evaluate type of descriptor access.

Pass -
Partial

Incorrectly generates error when calling constructor of dataclass with descriptor.

Incorrectly raises incompatibility type errors.

Pass Pass      dataclasses_final
Partial

Wrongly requires a Final dataclass field to be initialized at class level.

Doesn't support Final nested inside ClassVar.

Pass -Pass
Partial

Wrongly requires a Final dataclass field to be initialized at class level.

Doesn't support Final nested inside ClassVar.

Partial

Allows assignment to final attributes that are not initialized on the class

@@ -808,33 +721,28 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      dataclasses_hash
Partial

Does not report when dataclass is not compatible with Hashable protocol.

Pass
Partial

Does not report when dataclass is not compatible with Hashable protocol.

-
Partial

Does not report when dataclass is not compatible with Hashable protocol.

Pass      dataclasses_inheritance Pass Pass -
Partial

Does not reject ClassVar that is overridden by instance variable.

Does not reject instance variable that is overridden by ClassVar.

Pass Pass      dataclasses_kwonly Pass Pass -
Partial

Rejects legitimate use of dataclass field with `kw_only=True`.

Pass Pass      dataclasses_match_args Pass Pass -
Partial

Adds kw-only fields to __match_args__.

Pass Pass @@ -843,92 +751,79 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      dataclasses_postinit Pass Pass -
Partial

Does not perform validation of `__post_init__` method.

Incorrectly complains on the assignment of `InitVar` in class bodies.

Pass Pass      dataclasses_slots
Partial

Does not reject write to instance variable that is not defined in __slots__.

Pass -
Partial

Does not report error when `slots=True` is used with `__slots__` definition.

Does not reject write to instance variable that is not defined in __slots__.

Does not reject access to `__slots__` from dataclass instance when `slots=False`.

Partial

Does not reject write to instance variable that is not defined in __slots__.

Partial

__slots__ is generated but not checked during attribute assignment

     dataclasses_transform_class Pass Pass -
Partial

Does not support field specifiers.

Emits "attribute not initialized" error for dataclass field.

Pass Pass      dataclasses_transform_converter
Unsupported

Converter parameter not yet supported.

Pass -
Unsupported

Converter parameter not yet supported.

Partial

Converters are fully supported, failed to match generic overloads against other generics

Pass      dataclasses_transform_field
Partial

Does not properly handle field constructor that has default value for `kw_only` or `init` parameter.

Pass -
Unsupported

Does not understand dataclass transform field specifiers.

Pass Pass      dataclasses_transform_func
Partial

Does not handle `kw_only=False` override when `kw_only_default=True`.

Does not report error when `order=False` and comparison operators are used.

Pass -
Partial

Does not understand @dataclass_transform when it is applied only to overloads of a decorator but not the definition.

Does not detect non-frozen class inheriting from frozen class.

Emits "attribute not initialized" error for dataclass field.

Pass Pass      dataclasses_transform_meta Pass Pass -
Partial

Does not understand custom field specifiers.

Incorrectly rejects frozen dataclass that inherits from non-frozen.

Emits "attribute not initialized" error for dataclass field.

Pass Pass      dataclasses_usage
Pass*

Does not detect unannotated usage of `dataclasses.field()`.

Pass -
Partial

Does not report error when field with no default follows field with default.

Complains on `assert_type` when used for bound methods vs `Callable`.

Does not understand `__dataclass_fields__`.

Incorrectly raises incompatibility type errors.

Pass Pass - + Typed dictionaries      typeddicts_alt_syntax
Pass*

Does not support keyword-argument form of alternative syntax (deprecated in 3.11).

Pass -
Partial

Does not report when name of TypedDict doesn't match assigned identifier name.

Does not support keyword-argument form of alternative syntax (deprecated in 3.11).

Pass*

Does not support keyword-argument form of alternative syntax (deprecated in 3.11).

Pass      typeddicts_class_syntax Pass Pass -
Partial

Does not reject methods within TypedDict class.

Does not report when metaclass is provided.

Does not report when other keyword argument is provided.

Does not support generic TypedDict class.

Pass Pass      typeddicts_extra_items
Unsupported

Not supported.

Pass -
Unsupported

Not supported.

Pass Pass      typeddicts_final Pass Pass -
Partial

Does not handle value with literal type as index to TypedDict object.

Pass Pass @@ -937,33 +832,28 @@

Python Type System Conformance Test Results

Pass Pass Pass -
Partial

Does not check against inconsistent multiple inheritance

     typeddicts_operations Pass Pass Pass Pass -Pass      typeddicts_readonly Pass Pass Pass Pass -Pass      typeddicts_readonly_consistency Pass Pass Pass Pass -Pass      typeddicts_readonly_inheritance
Partial

Incorrectly rejects non-ReadOnly override of ReadOnly item.

Incorrectly rejects override of ReadOnly item with another ReadOnly item with narrower type.

Incorrectly rejects override of NotRequired ReadOnly item with a Required ReadOnly item.

Pass -Unsupported
Partial

Incorrectly rejects non-ReadOnly override of ReadOnly item.

Incorrectly rejects override of ReadOnly item with another ReadOnly item with narrower type.

Incorrectly rejects override of NotRequired ReadOnly item with a Required ReadOnly item.

Partial

Does not restrictions around overriding for ReadOnly fields

@@ -972,43 +862,37 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      typeddicts_readonly_update
Partial

Incorrectly allows update of ReadOnly item.

Incorrectly rejects update involving an item with Never type.

Pass -Pass
Partial

Incorrectly allows update of ReadOnly item.

Pass      typeddicts_required Pass Pass -
Partial

Does not reject use of `Required` in function parameter annotation.

Does not reject nested use of `Required` in type annotation.

Does not support recursive TypedDict definitions.

Incorrectly complains about uninitialized attributes on TypedDict definitions.

Incorrectly generates "attribute not initialized" errors for TypedDict fields.

Pass
Partial

Does not handle recursive typed dicts in functional syntax

     typeddicts_type_consistency Pass Pass -
Partial

Does not reject assignment of TypedDict with missing key.

Does not return non-Optional value from `get` method for required key.

Does not properly handle nested TypedDicts.

Pass Pass      typeddicts_usage Pass Pass -
Pass*

Does not report errant use of TypedDict in `isinstance` call.

Does not reject use of TypedDict as TypeVar bound.

Pass Pass - + Tuples      tuples_type_compat
Partial

Does not support tuple narrowing based on `len()` type guard (optional).

Pass -
Partial

Does not support some unpacked tuple forms.

Does not report type violation when assigning `tuple[int, ...]` to `tuple[int]`.

Does not support tuple narrowing based on `len()` type guard (optional).

Does not correctly evaluate `Sequence[Never]` for `tuple[()]`.

Pass*

Does not support tuple narrowing based on `len()` type guard (optional).

Pass @@ -1017,22 +901,19 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      tuples_unpacked
Partial

"More than one unpack" error is missing in some cases.

Pass Pass Pass -Pass - + Named tuples      namedtuples_define_class
Partial

Does not reject override of named tuple attribute in child class.

Pass -Pass
Partial

Does not reject override of named tuple attribute in child class.

Pass @@ -1041,23 +922,20 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      namedtuples_type_compat Pass Pass Pass Pass -Pass      namedtuples_usage
Partial

Does not reject attempt to delete named tuple field by name.

Pass Pass Pass -Pass - + Enumerations      enums_behaviors @@ -1065,44 +943,38 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      enums_definition Pass Pass Pass Pass -Pass      enums_expansion
Partial

Improperly applies narrowing to Flag subclass.

Pass -Pass
Partial

Improperly applies narrowing to Flag subclass.

Pass      enums_member_names
Pass*

Does not support special-cased handling of member name literal types in some cases (optional).

Pass -
Pass*

Does not support special-cased handling of member name literal types (optional).

Pass Pass      enums_member_values
Partial

Does not enforce declared type of `_value_`.

Does not enforce assigned tuple types for enum members (optional).

Pass -Pass
Partial

Does not enforce declared type of `_value_`.

Pass      enums_members
Partial

Does not treat attribute with annotation and no assignment as non-member.

Does not treat callables as non-members.

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Does not support `_ignore_` mechanism (optional).

Does not treat attributes with private names as non-members.

Pass*

Does not support `_ignore_` mechanism (optional).

-
Partial

Does not reject use of annotation with enum member.

Does not treat callables as non-members.

Does not treat annotated attributes as non-members.

Does not honor `enum.nonmember` to define non-member attribute.

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Rejects use of `_ignore_`.

Does not support `_ignore_` mechanism (optional).

Partial

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Does not treat somecallables as non-members.

Partial

Enum members that are aliases of other members do not resolved to the aliased member's type

- + Type narrowing      narrowing_typeguard @@ -1110,16 +982,14 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      narrowing_typeis Pass Pass Pass Pass -Pass - + Type checker directives      directives_assert_type @@ -1127,26 +997,22 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      directives_cast Pass Pass Pass Pass -Pass      directives_deprecated Pass Pass -
Unsupported

Does not support @deprecated.

Pass Unsupported      directives_no_type_check
Partial

Does not honor `@no_type_check` class decorator (allowed).

Does not reject invalid call of `@no_type_check` function.

Pass*

Does not honor `@no_type_check` class decorator (allowed).

-
Pass*

Does not honor @no_type_check decorator.

Pass Pass @@ -1155,19 +1021,16 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      directives_type_checking Pass Pass Pass Pass -Pass      directives_type_ignore
Partial

Does not honor "# type: ignore" comment if comment includes additional text.

Pass -Pass
Partial

Does not honor "# type: ignore" comment if comment includes additional text.

Pass @@ -1176,29 +1039,25 @@

Python Type System Conformance Test Results

Pass Pass Pass -Pass      directives_type_ignore_file2 Pass Pass Pass Pass -Pass      directives_version_platform
Pass*

Does not understand three-element form of sys.version checks.

Does not understand os.name checks.

Pass Pass Pass -Pass - + Historical and deprecated features      historical_positional
Partial

Does not reject positional-only parameter after non-positional-only parameter.

Treats keyword-only parameter as positional-only.

Applies legacy positional-only rules when PEP 570 syntax is used.

Pass -Pass
Partial

Does not reject positional-only parameter after non-positional-only parameter.

Treats keyword-only parameter as positional-only.

Applies legacy positional-only rules when PEP 570 syntax is used.

Pass diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index 64c68996..7e6fdaad 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -203,76 +203,6 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: return line_to_errors -class PyreTypeChecker(TypeChecker): - @property - def name(self) -> str: - return "pyre" - - def install(self) -> bool: - try: - # Delete the cache for consistent timings. - shutil.rmtree(".pyre") - except (shutil.Error, OSError): - # Ignore any errors here. - pass - - try: - # Uninstall any existing version if present. - run( - [sys.executable, "-m", "pip", "uninstall", "pyre-check", "-y"], - check=True, - ) - - # Install the latest version. - run( - [sys.executable, "-m", "pip", "install", "pyre-check"], - check=True, - ) - - # Generate a default config file. - pyre_config = '{"site_package_search_strategy": "pep561", "source_directories": ["."]}\n' - with open(".pyre_configuration", "w") as f: - f.write(pyre_config) - - return True - except CalledProcessError: - print("Unable to install pyre") - return False - - def get_version(self) -> str: - proc = run(["pyre", "--version"], stdout=PIPE, text=True) - version = proc.stdout.strip() - version = version.replace("Client version:", "pyre") - return version - - def run_tests(self, test_files: Sequence[str]) -> dict[str, str]: - proc = run(["pyre", "check"], stdout=PIPE, text=True, encoding="utf-8") - lines = proc.stdout.split("\n") - - # Add results to a dictionary keyed by the file name. - results_dict: dict[str, str] = {} - for line in lines: - file_name = line.split(":")[0].strip() - results_dict[file_name] = results_dict.get(file_name, "") + line + "\n" - - return results_dict - - def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: - # narrowing_typeguard.py:17:33 Incompatible parameter type [6]: In call `typing.GenericMeta.__getitem__`, for 1st positional argument, expected `Type[Variable[_T_co](covariant)]` but got `Tuple[Type[str], Type[str]]`. - line_to_errors: dict[int, list[str]] = {} - for line in output: - # Ignore multi-line errors - if ".py:" not in line and ".pyi:" not in line: - continue - # Ignore reveal_type errors - if "Revealed type [-1]" in line: - continue - assert line.count(":") >= 2, f"Failed to parse line: {line!r}" - _, lineno, _ = line.split(":", maxsplit=2) - line_to_errors.setdefault(int(lineno), []).append(line) - return line_to_errors - - class ZubanLSTypeChecker(MypyTypeChecker): @property def name(self) -> str: @@ -415,7 +345,6 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: TYPE_CHECKERS: Sequence[TypeChecker] = ( MypyTypeChecker(), PyrightTypeChecker(), - *([] if os.name == "nt" else [PyreTypeChecker()]), ZubanLSTypeChecker(), PyreflyTypeChecker(), ) diff --git a/conformance/tests/enums_members.py b/conformance/tests/enums_members.py index 3a623d27..6f18c97a 100644 --- a/conformance/tests/enums_members.py +++ b/conformance/tests/enums_members.py @@ -12,7 +12,7 @@ # > attribute -class Pet(Enum): # E?: Uninitialized attributes (pyre) +class Pet(Enum): genus: str # Non-member attribute species: str # Non-member attribute diff --git a/docs/index.rst b/docs/index.rst index 7f59e7b6..95d27748 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -81,12 +81,10 @@ Type Checkers * `mypy `_, the reference implementation for type checkers. -* `pyre `_, a type checker written in OCaml and - optimized for performance. +* `pyrefly `_, a fast type checker and language + server. * `pyright `_, a type checker that emphasizes speed. -* `pytype `_, a type checker that - checks and infers types for unannotated code. Development Environments ------------------------