module documentation
this module contains a set of functions to create astroid trees from scratch (build_* functions) or from living object (object_build_* functions)
Class |
|
class for building nodes from living object |
Function | attach |
create a Const node and register it in the locals of the given node with the specified name |
Function | attach |
create a dummy node and register it in the locals of the given node with the specified name |
Function | attach |
create a ImportFrom node and register it in the locals of the given node with the specified name |
Function | build |
create and initialize an astroid ClassDef node |
Function | build |
create and initialize an astroid ImportFrom import statement |
Function | build |
create and initialize an astroid FunctionDef node |
Function | build |
create and initialize an astroid Module node |
Function | object |
create astroid for a living class object |
Function | object |
create astroid for a living data descriptor object |
Function | object |
create astroid for a living function object |
Function | object |
create astroid for a living method descriptor object |
Function | register |
add given arguments to local |
Constant | TYPE |
Undocumented |
Constant | TYPE |
Undocumented |
Constant | TYPE |
Undocumented |
Function | _add |
Add a __class__ member to the given func node, if we can determine it. |
Function | _astroid |
astroid bootstrapping the builtins module |
Function | _attach |
Undocumented |
Function | _base |
create astroid for a living class object, with a given set of base names (e.g. ancestors) |
Function | _build |
Undocumented |
Function | _has |
Undocumented |
Function | _io |
Undocumented |
Function | _safe |
Undocumented |
Function | _set |
Undocumented |
Constant | _BUILTINS |
Undocumented |
Constant | _CONST |
Undocumented |
Constant | _CONSTANTS |
Undocumented |
Variable | _marker |
Undocumented |
def build_function(name, args:
list[ str] | None
= None, posonlyargs: list[ str] | None
= None, defaults=None, doc=None, kwonlyargs: list[ str] | None
= None) -> nodes.FunctionDef
:
(source)
¶
create and initialize an astroid FunctionDef node
add given arguments to local
args is a list that may contains nested lists (i.e. def func(a, (b, c, d)): ...)