class AstroidBuilder(raw_building.InspectBuilder): (source)
Class for building an astroid tree from source code or from a live module.
The param manager specifies the manager class which should be used. If no manager is given, then the default one will be used. The param apply_transforms determines if the transforms should be applied after the tree was built from source or from a live object, by default being True.
Method | __init__ |
Undocumented |
Method | add_from_names_to_locals |
Store imported names to the locals |
Method | delayed_assattr |
Visit a AssAttr node |
Method | file_build |
Build astroid from a source code file (i.e. from an ast) |
Method | module_build |
Build an astroid from a living module instance. |
Method | string_build |
Build astroid from source code string. |
Method | _data_build |
Build tree node from data and add some information |
Method | _post_build |
Handles encoding and delayed nodes after a module has been built |
Instance Variable | _apply_transforms |
Undocumented |
Inherited from InspectBuilder
:
Method | imported_member |
verify this is not an imported class or handle it |
Method | inspect_build |
build astroid from a living module (i.e. using inspect) this is used when there is no python source code available (either because it's a built-in module or because the .py is not available) |
Method | object_build |
recursive method which create a partial ast from real objects (only function, class, and method are handled) |
Instance Variable | _done |
Undocumented |
Instance Variable | _manager |
Undocumented |
Instance Variable | _module |
Undocumented |
Build astroid from a source code file (i.e. from an ast)
path is expected to be a python source file
Parameters | |
module:types.ModuleType | Undocumented |
modname:Optional[ | Undocumented |
Returns | |
nodes.Module | Undocumented |