You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dependabot[bot] 492a4bfde1
Bump actions/cache from 3.0.6 to 3.0.7 (#1740)
4 days ago
.github Bump actions/cache from 3.0.6 to 3.0.7 (#1740) 4 days ago
astroid Fix a crash inferring invalid string formatting with `%` 7 days ago
doc Update sphinx requirement from ~=5.0 to ~=5.1 (#1720) 4 weeks ago
script Bump astroid to 2.12.2, update changelog 1 month ago
tests Fix a crash inferring invalid string formatting with `%` 7 days ago
.coveragerc Make ``LookupMixIn`` inherit from ``NodeNG`` (#1632) 2 months ago
.gitattributes Introduce end-of-line normalization (#1443) 6 months ago
.gitignore Fix the qt brain for Signals on PySide 2 and 6 (#1654) 2 months ago
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 1 week ago
.readthedocs.yaml Add .readthedocs.yaml so every contributor can change read the doc config 1 year ago
CONTRIBUTORS.txt Fixes #1717 - ignore FutureWarnings which are raised by pandas (#1719) 4 weeks ago
ChangeLog Fix a crash inferring invalid string formatting with `%` 7 days ago
LICENSE Fix issue #891 1 year ago
MANIFEST.in Improve packaging [PEP 517 + 621] (#1670) 2 months ago
README.rst Update README so Tidelift logo is not stretched 5 months ago
pylintrc Update typing for Python 3.7 (2) (#1556) 3 months ago
pyproject.toml Improve packaging [PEP 517 + 621] (#1670) 2 months ago
requirements_test.txt Update pre-commit requirement from ~=2.19 to ~=2.20 (#1711) 1 month ago
requirements_test_brain.txt Fix crash in `ExplicitNamespacePackageFinder` (#1714) 1 week ago
requirements_test_min.txt Add ``typing-extensions`` to test dependencies (#1586) 3 months ago
requirements_test_pre_commit.txt Bump flake8 from 5.0.3 to 5.0.4 (#1731) 2 weeks ago
setup.cfg [pre-commit.ci] pre-commit autoupdate (#1726) 2 weeks ago
tbump.toml Bump astroid to 2.12.2, update changelog 1 month ago
tox.ini Use an isolated build for Tox (#1733) 2 weeks ago

README.rst

Astroid

Coverage badge from coveralls.io

Documentation Status

image

pre-commit.ci status

Tidelift Professional support for astroid is available as part of the Tidelift Subscription. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.

What's this?

The aim of this module is to provide a common base representation of python source code. It is currently the library powering pylint's capabilities.

It provides a compatible representation which comes from the _ast module. It rebuilds the tree generated by the builtin _ast module by recursively walking down the AST and building an extended ast. The new node classes have additional methods and attributes for different usages. They include some support for static inference and local name scopes. Furthermore, astroid can also build partial trees by inspecting living objects.

Installation

Extract the tarball, jump into the created directory and run:

pip install .

If you want to do an editable installation, you can run:

pip install -e .

If you have any questions, please mail the code-quality@python.org mailing list for support. See http://mail.python.org/mailman/listinfo/code-quality for subscription information and archives.

Documentation

http://astroid.readthedocs.io/en/latest/

Python Versions

astroid 2.0 is currently available for Python 3 only. If you want Python 2 support, use an older version of astroid (though note that these versions are no longer supported).

Test

Tests are in the 'test' subdirectory. To launch the whole tests suite, you can use either tox or `pytest`:

tox
pytest astroid