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
It seems that mypy should actually warn about the assignment of the set in the following code:
from typing import Dict, Any
params: Dict[str, Any] = {}
a: Dict[str, Any] = params.get("abc", set())
reveal_type(a)
mypy does not warn about the incorrect assignment of Set to a but correctly reveals that the type of a is Dict[str, Any]. Sadly the use of Any in this case is common as these dicts represent complex configuration files.
Tested with the current git master version.
The text was updated successfully, but these errors were encountered:
It seems that mypy should actually warn about the assignment of the set in the following code:
mypy does not warn about the incorrect assignment of Set to a but correctly reveals that the type of a is Dict[str, Any]. Sadly the use of Any in this case is common as these dicts represent complex configuration files.
Tested with the current git master version.
The text was updated successfully, but these errors were encountered: