-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't workingspec compliance
Description
A tuple of one type + a TypeVarTuple can't be assigned to a bare tuple:
(In Pyright Playground)
def accepts_any_tuple(t: tuple):
...
def test[*_Ts](t: tuple[int, *_Ts]):
accepts_any_tuple(t)Argument of type "tuple[int, *_Ts@test]" cannot be assigned to parameter "t" of type "tuple[Unknown, ...]" in function "accepts_any_tuple"
"tuple[int, *_Ts@test]" is incompatible with "tuple[Unknown, ...]"
Tuple size mismatch; expected 1 but received 2
It looks like the tuple is inferred to have size 2 for some reason?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't workingspec compliance