-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
I usually make extensive use of type annotation to take advantage of type hinting in programming tools. For example:
data: dict[int, tuple[str, int, float]] = {}
# a few data handlings later
for k, val in data.items():
foo, bar, boo = valk would be annotated as int, val as tuple[str, int, int], and variables foo, bar, boo here would be annotated as str, int, float respectively. However, if I use SortedDict instead of dict here, it would only annotate data as SortedDict, and the other variables here would be annotated as Any.
It would be helpful to support annotation for classes such as SortedDict and SortedSet similar to builtins like dict and set.
kiyoon, vtgn, AY1uZwIcJzKhaGywovQP, Zac-HD, olejorgenb and 2 more
Metadata
Metadata
Assignees
Labels
No labels