How to tell pycharm the type of a index variable when looping
Answered
Let's say I am looping through a list of objects:
for object in objects:
# do something
Is there some way I can inform pycharm as to the type of object so that I get the method auto-completion pops up?
Please sign in to leave a comment.
You can use one of the flavors of Python type hinting. What version of Python are you using?
Type hinting in 2.x example I used recently.