-
Notifications
You must be signed in to change notification settings - Fork 216
Open
astral-sh/ruff
#22134Labels
narrowingrelated to flow-sensitive type narrowingrelated to flow-sensitive type narrowing
Milestone
Description
From the typing spec: https://typing.python.org/en/latest/spec/tuples.html#type-compatibility-rules, we currently do not support this.
def func(subj: tuple[int | str, int | str]):
match subj:
case x, str():
reveal_type(subj) # tuple[int | str, str]
case y:
reveal_type(subj) # tuple[int | str, int]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
narrowingrelated to flow-sensitive type narrowingrelated to flow-sensitive type narrowing