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.
When using "stringy" types such as List["SomeClass"] and a for loop over that (or any other operation that returns the element type), the element in the loop is not resolved as type SomeClass
Full repro example (see the comments for where the issue appears):
fromtypingimportListclassBar:
defbar_method(self) ->int:
return1deflist_of_bars() ->List["Bar"]:
return []
defno_string_list_of_bars() ->List[Bar]:
return []
defa_single_bar() ->"Bar":
returnBar()
deftest():
single=a_single_bar()
single.bar_method()
l=list_of_bars()
foriteminl: # Hover: Type of item is unresolveditem.bar_method() # Go to definition does not workl2=no_string_list_of_bars()
foritem2inl2: # Type is resolved hereitem2.bar_method() # Ctrl+click works