class documentation
Given a module, or a function that was compiled as part of a module, re-compile the module into an AST and extract the sub-AST for the function. Allow caching to reduce number of compiles. Also contains static helper utility functions to look for python files, to parse python files, and to extract the file/line information from a code object.
Static Method | find |
Return all the python files in a source tree |
Static Method | get |
Returns the file and line number of a code object. |
Static Method | parse |
Parse a python file into an AST. |
Method | __call__ |
Undocumented |
Method | __init__ |
Undocumented |
Instance Variable | cache |
Undocumented |
Return all the python files in a source tree Ignores any path that contains the ignore string This is not used by other class methods, but is designed to be used in code that uses this class.
Returns the file and line number of a code object. If the code object has a __file__ attribute (e.g. if it is a module), then the returned line number will be 0