Skip to content

False Positive in UP007 #7452

@Matt-Ord

Description

@Matt-Ord

False positive when using Union of unpacked TypeVarTuple. As far as I know there is no way to represent this without using Union[].

class Collection(Protocol[*_B0]):
    def __iter__(self) -> Iterator[Union[*_B0]]:
        ...

ruff 0.0.290

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedReady for implementationbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions