In PyCharm, you can select a function and press Alt + Shift + F7 to start a search for usage. It is also available in the "Edit β Find β Find Usage" section. It looks more intelligent than text search.
Using static analysis to find where a function is called from is generally difficult in Python because it uses dynamic binding and has a lot of introspection, so itβs very easy to get false positives to skip using. In the case of modular functions, I find it a good solution to always use module.function to call the function and never do from module import function . That way you can do a text search for "module.function". Python style guides usually recommend importing functions, etc. So I think this is generally accepted good practice.
Finding method calls is, of course, much more difficult. One of the things that I like about developing in Java and C # is the ability to find all the ways to use the method through static analysis.
Peter Graham
source share