-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongpriority-1-normaltopic-pep-646PEP 646 (TypeVarTuple, Unpack)PEP 646 (TypeVarTuple, Unpack)
Description
Currently for a class defined as
T = TypeVar("T", bound=int)
S = TypeVar("S", bound=str)
Ts = TypeVarTuple("Ts")
class G(Generic[T, Unpack[Ts], S]): ...
we allow a least 2 type arguments, but in fact 1 type argument may be fine as well, for example if it is an unpack of fixed (or maybe even variable) length tuple, or an unpack of TypeVarTuple (bound in current scope).
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongpriority-1-normaltopic-pep-646PEP 646 (TypeVarTuple, Unpack)PEP 646 (TypeVarTuple, Unpack)