You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type-hint instances of types passed as TypeVarTuple? #1347
but that results in hints like Type[A] | Type[B] rather than A | B (for passed types A, B). Is there some way to resolve to instances of the passed types?
Activity
erictraut commentedon Feb 10, 2023
I don't think there's a way to do this with
TypeVarTuple, but you can use an unpackedtupleinstead.(Note: This causes the latest version of mypy to crash, but it works fine in pyright.)
harenbrs commentedon Feb 11, 2023
Brilliant, works perfectly. Thanks!