-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
astral-sh/ruff
#19693Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation
Milestone
Description
from typing import TypeVar
from typing_extensions import reveal_type
_K = TypeVar("_K")
_V = TypeVar("_V")
class MyDict(dict[_K, _V]):
pass
a = MyDict(foo=1)
reveal_type(a)which gives
error[no-matching-overload] mwe.py:13:5: No overload of bound method `__init__` matches arguments
info[revealed-type] mwe.py:14:13: Revealed type: `MyDict[Unknown, Unknown]`
and works with mypy.
Originally posted by @MarcinKonowalczyk in #587
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