-
Notifications
You must be signed in to change notification settings - Fork 216
Open
astral-sh/ruff
#21801Labels
type aliasestyping semanticstyping-module features, spec compliance, etctyping-module features, spec compliance, etc
Milestone
Description
Support generic PEP 695 aliases if they are manually constructed via TypeAliasType(…):
from typing import TypeAliasType, TypeVar, reveal_type
K = TypeVar("K")
V = TypeVar("V")
MyDict = TypeAliasType("MyDict", dict[K, V], type_params=(K, V))
def _(x: MyDict[str, int]):
reveal_type(x) # should be: dict[str, int]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type aliasestyping semanticstyping-module features, spec compliance, etctyping-module features, spec compliance, etc