package documentation
Python Abstract Syntax Tree New Generation
The aim of this module is to provide a common base representation of python source code for projects such as pychecker, pyreverse, pylint... Well, actually the development of this library is essentially governed by pylint's needs.
It extends class defined in the python's _ast module with some additional methods and attributes. Instance attributes are added by a builder object, which can either generate extended ast (let's call them astroid ;) by visiting an existent ast tree or by inspecting living object. Methods are added by monkey patching ast classes.
Main modules are:
- nodes and scoped_nodes for more information about methods and attributes added to different node classes
- the manager contains a high level object to get astroid trees from source files and living objects. It maintains a cache of previously constructed tree for quick access
- builder contains the class responsible to build astroid trees
Module | __pkginfo__ |
Undocumented |
Module | arguments |
No module docstring; 1/1 class documented |
Module | astroid |
This file contain the global astroid MANAGER, to prevent circular import that happened when the only possibility to import it was from astroid.__init__.py. |
Module | bases |
This module contains base classes and functions for the nodes and some inference utils. |
Package | brain |
No package docstring; 34/49 modules documented |
Module | builder |
The AstroidBuilder makes astroid from living object and / or from _ast |
Module | const |
Undocumented |
Module | context |
Various context related utilities, including inference and call contexts. |
Module | decorators |
A few useful function/method decorators. |
Module | exceptions |
this module contains exceptions used in the astroid library |
Module | filter |
_filter_stmts and helper functions. This method gets used in LocalsDictnodes.NodeNG._scope_lookup. It is not considered public. |
Module | helpers |
Various helper utilities. |
Module | inference |
this module contains a set of functions to handle inference on astroid trees |
Module | inference |
Transform utilities (filters and decorator) |
Package | interpreter |
No package docstring; 2/2 modules, 0/1 package documented |
Module | manager |
astroid manager: avoid multiple astroid build of a same module when possible by providing a class responsible to get astroid representation from various source and using a cache of built modules) |
Module | mixins |
This module contains some mixins for the different nodes. |
Module | modutils |
Python modules manipulation utility functions. |
Module | node |
Undocumented |
Package | nodes |
Every available node class. |
Module | objects |
Inference objects are a way to represent composite AST nodes, which are used only as inference results, so they can't be found in the original AST tree. For instance, inferring the following frozenset use, leads to an inferred FrozenSet:... |
Module | protocols |
this module contains a set of functions to handle python protocols for nodes where it makes sense. |
Module | raw |
this module contains a set of functions to create astroid trees from scratch (build_* functions) or from living object (object_build_* functions) |
Module | rebuilder |
this module contains utilities for rebuilding an _ast tree in order to get a single Astroid representation |
Module | scoped |
Undocumented |
Module | test |
Utility functions for test code that uses astroid ASTs as input. |
Module | transforms |
No module docstring; 1/1 class documented |
Module | util |
No module docstring; 1/4 function, 4/4 classes documented |
Module | _ast |
No module docstring; 0/1 variable, 1/7 function, 0/1 class documented |
From __init__.py
:
Constant | ASTROID |
Undocumented |
Constant | BRAIN |
Undocumented |