Pycharm Find Usage not working when using "import as"

Answered

Hello,

I've discovered that when a function is imported into another module with "import as" then Find Usage won't work properly.

# my_module
def login:
pass
# my_other_module
from my_module import login as my_login

In this case when I focus on the function definition "login" into "my_module" and Click on Find Usage then the result is empty.

I've noticed this occurs anywhere I use the `import as` form. It works otherwise with the standard `from my_module import login`.

 

 

1
3 comments
Avatar
Permanently deleted user

Version: 2017.1.3

Notice that it works the other way around: if I focus on `my_login` and click on "Go To/Declaration" it will correctly go to its declaration. But if from the declaration I select "Find Usage" the result will be empty.

0

Hi Groob! Unfortunately it's not possible right now. But I've created a feature request PY-24522 - please vote.

0

Please sign in to leave a comment.