Skip to content

Tuple type form with multiple unpacks should be legal #7114

@erictraut

Description

@erictraut

If a tuple contains multiple unpacks without introducing multiple unbounded tuples, it should be legal.

The following currently generates an error, but it should not.

t1: tuple[*tuple[str], *tuple[str]]  # OK

Similarly for Unpack:

t11: tuple[Unpack[tuple[str]], Unpack[tuple[str]]]  # OK

Similarly for TypeVarTuples:

def func3(t: tuple[*Ts]):
    t5: tuple[*tuple[str], *Ts]  # OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    addressed in next versionIssue is fixed and will appear in next published versionbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions