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
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Convert lists/dicts/etc with consistent types to specific types #605
a= [1, 2, 3] # we show "list", but could be "list[int]"b= [[1, 2], [3, 4]] # we show "list", but could be "list[list[int]]"s= {1, 2, 3} # we show "set", but could be "set[int]"d= {1: "1", 2: "2"} # we show "dict", but could be "dict[int, str]"
This may be something done in the analysis, or for tooltips only. The former may provide better analysis in other places where we want to know that information. The latter may be more simple to do, as it'd be a check over the values to see if they're the same before displaying.
We still store per-index types under the hood (i.e. [1, "2"][0]. will show int completion), so the latter would seem to make more sense, but given that the analysis gets discarded and redone when a file changes, the former would probably work out as well.
Activity
jakebailey commentedon Feb 21, 2019
Related: #207