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:
Package | brain |
No package docstring; 34/49 modules documented |
Package | interpreter |
No package docstring; 2/2 modules, 0/1 package documented |
Package | nodes |
Every available node class. |
Module | __pkginfo__ |
Undocumented |
Module | arguments |
No module docstring; 1/1 class documented |
Module | astroid_manager |
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. |
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_statements |
_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_tip |
Transform utilities (filters and decorator) |
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_classes |
Undocumented |
Module | objects |
No summary |
Module | protocols |
this module contains a set of functions to handle python protocols for nodes where it makes sense. |
Module | raw_building |
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_nodes |
Undocumented |
Module | test_utils |
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_INSTALL_DIRECTORY |
Undocumented |
Constant | BRAIN_MODULES_DIRECTORY |
Undocumented |