gak / pycallgraph

pycallgraph is a Python module that creates call graphs for Python programs.
GNU General Public License v2.0
1.83k stars 334 forks source link

Static analysis #117

Open Alexei-Kornienko opened 11 years ago

Alexei-Kornienko commented 11 years ago

Hello is there any way to generate a callgraph from class/module statically?

Use case: I would like to see relations between class public and private methods to use this information for refactoring. I'm not able to use dynamic analysis cause I'm not able to run class separately and cover every possible execution path.

Regards.

gak commented 11 years ago

This is a good idea, unfortunately pycallgraph currently only does runtime analysis.

I'll leave the ticket open if anyone is interested in implementing this cool task :)

Are you considering "private methods" as anything starting with underscore(s), or methods that are only called internally (which would be shown in analysis)?

Alexei-Kornienko commented 11 years ago

I guess methods starting with underscore should be considered private. When I'll have some free time I'll try to look how this feature can be implemented. If I'll have something to share I'll try to keep you updated on this.

RobBednark commented 10 years ago

I would love to see static analysis as well!