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
I have Python2 code building some nested structures like lists/tuples/sets/dicts in dicts. For populating the nested structure I keep a temporary reference, which mypy fails to parse if the (untyped) temporary reference is not the first variable being assigned:
#!/usr/bin/python2.7fromtypingimportDict, Set# noqax= {} # type: Dict[str, Set[str]]z=x[''] =set() # okayx[''] =y=set() # fail: Incompatible types in assignment (expression has type "Set[<nothing>]", target has type "Set[str]")