-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a few bugs in the conformance tests: (#1585)
* Updated comments in `protocols_explicit` to clarify that error must be generated at class instantiation time rather than class declaration time. Updated pyright results to indicate that it does not pass this test. * Fixed a couple of bugs in the `generics_typevartuple_specialization` test that caused the test not to properly test what it was intended to test. * Added a missing test to the `generics_typevartuple_callable` test. * Fixed a bug in the `generics_typevartuple_basic` test that caused the test not to properly test what was intended.
- Loading branch information
Showing
19 changed files
with
70 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
conformance/results/mypy/generics_typevartuple_specialization.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
conformant = "Partial" | ||
notes = """ | ||
Incorrectly reports type incompatibility when generic class is specialized with `*tuple[Any, ...]`. | ||
Incorrectly specializes generic alias that includes a TypeVar and TypeVarTuple if no type arguments are provided. | ||
Rejects use of unpacked TypeVarTuple in generic type alias definition. | ||
Rejects specialization of generic type alias defined as a tuple containing a TypeVar. | ||
"More than one Unpack" error message has no line number. | ||
Incorrectly evaluates tuple split across a TypeVarTuple and a TypeVar. | ||
""" | ||
output = """ | ||
generics_typevartuple_specialization.py: error: More than one Unpack in a type is not allowed [misc] | ||
generics_typevartuple_specialization.py:85: error: Argument 1 to "takes_float_array_with_specific_shape" has incompatible type "Array2[float, *tuple[Any, ...]]"; expected "Array2[float, Height, Width]" [arg-type] | ||
generics_typevartuple_specialization.py:95: error: Expression is of type "tuple[Any, *tuple[Any, ...]]", not "tuple[Any, ...]" [assert-type] | ||
generics_typevartuple_specialization.py:108: error: Type application is only supported for generic classes [misc] | ||
generics_typevartuple_specialization.py:109: error: Type application is only supported for generic classes [misc] | ||
generics_typevartuple_specialization.py:109: error: Unpack is only valid in a variadic position [valid-type] | ||
generics_typevartuple_specialization.py:110: error: Type application is only supported for generic classes [misc] | ||
generics_typevartuple_specialization.py:110: error: Unpack is only valid in a variadic position [valid-type] | ||
generics_typevartuple_specialization.py:127: error: Bad number of arguments for type alias, expected: at least 2, given: 1 [type-arg] | ||
generics_typevartuple_specialization.py:159: error: Expression is of type "tuple[str, *tuple[int, ...]]", not "tuple[str, *tuple[int, ...], int]" [assert-type] | ||
generics_typevartuple_specialization.py:163: error: TypeVarTuple "Ts2" is unbound [valid-type] | ||
generics_typevartuple_specialization.py:163: error: TypeVarTuple cannot be split [type-arg] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.