-
Notifications
You must be signed in to change notification settings - Fork 227
Closed
astral-sh/ruff
#18351Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation
Description
Found this while analyzing common ecosystem false positives. I think this should work?
from typing import Sequence, Any
seq: Sequence[Any] = "abc" # `Literal["abc"]` is not assignable to `Sequence[Any]`https://play.ty.dev/1059069f-082c-4e2f-a643-92b3f0d8583c
Both of these cases work:
seq: Sequence[Any] = some_str
seq: Sequence[str] = "abc"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation