module documentation
(source)

this module contains a set of functions to create astroid trees from scratch (build_* functions) or from living object (object_build_* functions)
Class ​Inspect​Builder class for building nodes from living object
Function attach​_const​_node create a Const node and register it in the locals of the given node with the specified name
Function attach​_dummy​_node create a dummy node and register it in the locals of the given node with the specified name
Function attach​_import​_node create a ImportFrom node and register it in the locals of the given node with the specified name
Function build​_class create and initialize an astroid ClassDef node
Function build​_from​_import create and initialize an astroid ImportFrom import statement
Function build​_function create and initialize an astroid FunctionDef node
Function build​_module create and initialize an astroid Module node
Function object​_build​_class create astroid for a living class object
Function object​_build​_datadescriptor create astroid for a living data descriptor object
Function object​_build​_function create astroid for a living function object
Function object​_build​_methoddescriptor create astroid for a living method descriptor object
Function register​_arguments add given arguments to local
Constant TYPE​_ELLIPSIS Undocumented
Constant TYPE​_NONE Undocumented
Constant TYPE​_NOTIMPLEMENTED Undocumented
Function _add​_dunder​_class Add a __class__ member to the given func node, if we can determine it.
Function _astroid​_bootstrapping astroid bootstrapping the builtins module
Function _attach​_local​_node Undocumented
Function _base​_class​_object​_build create astroid for a living class object, with a given set of base names (e.g. ancestors)
Function _build​_from​_function Undocumented
Function _has​_underlying​_object Undocumented
Function _io​_discrepancy Undocumented
Function _safe​_has​_attribute Undocumented
Function _set​_proxied Undocumented
Constant _BUILTINS Undocumented
Constant _CONST​_PROXY Undocumented
Constant _CONSTANTS Undocumented
Variable _marker Undocumented
def attach_const_node(node, name, value): (source)
create a Const node and register it in the locals of the given node with the specified name
def attach_dummy_node(node, name, runtime_object=_marker): (source)
create a dummy node and register it in the locals of the given node with the specified name
def attach_import_node(node, modname, membername): (source)
create a ImportFrom node and register it in the locals of the given node with the specified name
def build_class(name, basenames=(), doc=None): (source)
create and initialize an astroid ClassDef node
def build_from_import(fromname, names): (source)
create and initialize an astroid ImportFrom import statement
def build_function(name, args=None, posonlyargs=None, defaults=None, doc=None, kwonlyargs=None): (source)
create and initialize an astroid FunctionDef node
Parameters
nameUndocumented
args:Optional[List[str]]Undocumented
posonlyargs:Optional[List[str]]Undocumented
defaultsUndocumented
docUndocumented
kwonlyargs:Optional[List[str]]Undocumented
Returns
nodes.FunctionDefUndocumented
def build_module(name, doc=None): (source)
create and initialize an astroid Module node
Parameters
name:strUndocumented
doc:Optional[str]Undocumented
Returns
nodes.ModuleUndocumented
def object_build_class(node, member, localname): (source)
create astroid for a living class object
def object_build_datadescriptor(node, member, name): (source)
create astroid for a living data descriptor object
def object_build_function(node, member, localname): (source)
create astroid for a living function object
def object_build_methoddescriptor(node, member, localname): (source)
create astroid for a living method descriptor object
def register_arguments(func, args=None): (source)

add given arguments to local

args is a list that may contains nested lists (i.e. def func(a, (b, c, d)): ...)

TYPE_ELLIPSIS = (source)

Undocumented

Value
type(...)
TYPE_NONE = (source)

Undocumented

Value
type(None)
TYPE_NOTIMPLEMENTED = (source)

Undocumented

Value
type(NotImplemented)
def _add_dunder_class(func, member): (source)
Add a __class__ member to the given func node, if we can determine it.
def _astroid_bootstrapping(): (source)
astroid bootstrapping the builtins module
def _attach_local_node(parent, node, name): (source)

Undocumented

def _base_class_object_build(node, member, basenames, name=None, localname=None): (source)
create astroid for a living class object, with a given set of base names (e.g. ancestors)
def _build_from_function(node, name, member, module): (source)

Undocumented

def _has_underlying_object(self): (source)

Undocumented

def _io_discrepancy(member): (source)

Undocumented

def _safe_has_attribute(obj, member): (source)

Undocumented

def _set_proxied(const): (source)

Undocumented

_BUILTINS = (source)

Undocumented

Value
vars(builtins)
_CONST_PROXY: dict = (source)

Undocumented

Value
{}
_CONSTANTS = (source)

Undocumented

Value
tuple(node_classes.CONST_CLS)
_marker = (source)

Undocumented