You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The argument of dict[K,V].get is constrained: only arguments of type K are allowed. However {} is untyped, which is an error. Even something as simple as this is a problem:
x = {} # => error: Need type annotation for "x" (hint: "x: dict[<type>, <type>] = ...") [var-annotated]
Note that x = dict[str,str]().get("x") works fine.
Activity
kstauffer commentedon Aug 16, 2025
The argument of dict[K,V].get is constrained: only arguments of type K are allowed. However {} is untyped, which is an error. Even something as simple as this is a problem:
Note that
x = dict[str,str]().get("x")works fine.