| 1 |
Astroid |
| 2 |
======= |
| 3 |
|
| 4 |
.. image:: https://codecov.io/gh/pylint-dev/astroid/branch/main/graph/badge.svg |
| 5 |
:target: https://codecov.io/gh/pylint-dev/astroid |
| 6 |
:alt: Coverage badge from codecov |
| 7 |
|
| 8 |
.. image:: https://readthedocs.org/projects/astroid/badge/?version=latest |
| 9 |
:target: http://astroid.readthedocs.io/en/latest/?badge=latest |
| 10 |
:alt: Documentation Status |
| 11 |
|
| 12 |
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg |
| 13 |
:target: https://github.com/ambv/black |
| 14 |
|
| 15 |
.. image:: https://results.pre-commit.ci/badge/github/pylint-dev/astroid/main.svg |
| 16 |
:target: https://results.pre-commit.ci/latest/github/pylint-dev/astroid/main |
| 17 |
:alt: pre-commit.ci status |
| 18 |
|
| 19 |
.. |tidelift_logo| image:: https://raw.githubusercontent.com/pylint-dev/astroid/main/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png |
| 20 |
:width: 200 |
| 21 |
:alt: Tidelift |
| 22 |
|
| 23 |
.. list-table:: |
| 24 |
:widths: 10 100 |
| 25 |
|
| 26 |
* - |tidelift_logo| |
| 27 |
- Professional support for astroid is available as part of the |
| 28 |
`Tidelift Subscription`_. Tidelift gives software development teams a single source for |
| 29 |
purchasing and maintaining their software, with professional grade assurances |
| 30 |
from the experts who know it best, while seamlessly integrating with existing |
| 31 |
tools. |
| 32 |
|
| 33 |
.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-astroid?utm_source=pypi-astroid&utm_medium=referral&utm_campaign=readme |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
What's this? |
| 38 |
------------ |
| 39 |
|
| 40 |
The aim of this module is to provide a common base representation of |
| 41 |
python source code. It is currently the library powering pylint's capabilities. |
| 42 |
|
| 43 |
It provides a compatible representation which comes from the `_ast` |
| 44 |
module. It rebuilds the tree generated by the builtin _ast module by |
| 45 |
recursively walking down the AST and building an extended ast. The new |
| 46 |
node classes have additional methods and attributes for different |
| 47 |
usages. They include some support for static inference and local name |
| 48 |
scopes. Furthermore, astroid can also build partial trees by inspecting living |
| 49 |
objects. |
| 50 |
|
| 51 |
|
| 52 |
Installation |
| 53 |
------------ |
| 54 |
|
| 55 |
Extract the tarball, jump into the created directory and run:: |
| 56 |
|
| 57 |
pip install . |
| 58 |
|
| 59 |
|
| 60 |
If you want to do an editable installation, you can run:: |
| 61 |
|
| 62 |
pip install -e . |
| 63 |
|
| 64 |
|
| 65 |
If you have any questions, please mail the [email protected] |
| 66 |
mailing list for support. See |
| 67 |
http://mail.python.org/mailman/listinfo/code-quality for subscription |
| 68 |
information and archives. |
| 69 |
|
| 70 |
Documentation |
| 71 |
------------- |
| 72 |
http://astroid.readthedocs.io/en/latest/ |
| 73 |
|
| 74 |
|
| 75 |
Python Versions |
| 76 |
--------------- |
| 77 |
|
| 78 |
astroid 2.0 is currently available for Python 3 only. If you want Python 2 |
| 79 |
support, use an older version of astroid (though note that these versions |
| 80 |
are no longer supported). |
| 81 |
|
| 82 |
Test |
| 83 |
---- |
| 84 |
|
| 85 |
Tests are in the 'test' subdirectory. To launch the whole tests suite, you can use |
| 86 |
either `tox` or `pytest`:: |
| 87 |
|
| 88 |
tox |
| 89 |
pytest |