Technologicat / pyan

Static call graph generator. The official Python 3 version. Development repo.
GNU General Public License v2.0
323 stars 56 forks source link

Feature Suggestion: Customize depth (level) of generated graph #80

Open z0gSh1u opened 2 years ago

z0gSh1u commented 2 years ago

pyan now visits down to the level of functions. If you can provide a parameter called depth or level, which enables users to get a package (or module) level of the graph generated, then pyan will also become a module dependency analysis tool.

To achieve this, take Graphviz .dot format file for example, we just need to remove the last double low dash __xxx part, and remove duplicate edges.

Before:

before

After:

after