Pycharm Call Hierarchy for functions imported from module in project

180 Views Asked by At

The call hierarchy functionality in Pycharm is useful for finding where a function is called but also which functions are called by a particular function. I am using the latter, but when I do this I only see the functions in the current module.

For example if I have a project structured like this:

project/
    moduleA.py
    moduleB.py

And moduleA contains:

import moduleB

def funcA1(x):
    return funcA2(x) + moduleB.funcB1(x)

I can see that the callee methods heirarchy contains funcA2 but not moduleB.funcB1(x). I am using the "Production" scope for this to include files in the current project.

Am I missing something here? I'd like to see all the functions that are being called in the entire project not just the current module. I've tried manually configuring a custom scope that includes all the project files but I get the same result.

Is there a way to view the callee methods heirarchy so that functions that are imported from other modules in the project are included?

0

There are 0 best solutions below