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
Ah, seems like a problem with how mypy handles generic type aliases, such as Dict -> dict. Not sure exactly why this happens, but my guess is that they leak from builtins.pyi somehow.
This is a bit thorny to fix, because Dict/List/Set are currently implemented as aliases to dict/list/set, and all the genericity is specified in typeshed/*/builtins.pyi.
I propose not to worry too much about it for 0.3.2.
Activity
JukkaL commentedon Nov 25, 2015
Ah, seems like a problem with how mypy handles generic type aliases, such as
Dict->dict. Not sure exactly why this happens, but my guess is that they leak frombuiltins.pyisomehow.gvanrossum commentedon Feb 22, 2016
FWIW the same thing happens to Set. I don't believe there are other types that have this issue; those three (List, Dict, Set) are treated special by mypy. See https://github.com/python/mypy/blob/master/mypy/nodes.py#L74
[-]Dict and List seem to be assumed by default[/-][+]Dict, List and Set are imported by default[/+]gvanrossum commentedon Apr 14, 2016
This is a bit thorny to fix, because Dict/List/Set are currently implemented as aliases to dict/list/set, and all the genericity is specified in typeshed/*/builtins.pyi.
I propose not to worry too much about it for 0.3.2.
JukkaL commentedon Apr 14, 2016
Agreed. Maybe move this to 0.3.3?
gvanrossum commentedon Apr 14, 2016
Moved to 0.3.3.
Do not import List, Dict, and Set by default (#2863)