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
Passing a dict literal works because mypy is able to infer the static type from type context. When you assign variables, mypy uses the explicit type hint or infers a type for the variable from the expression in the left hand side.
It seems that
Mapping[k, v]
is invariant tok
, but not when a dict literal is passed.To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=4195e62f5ea8fa4b027988aa9174bb7c
The text was updated successfully, but these errors were encountered: