diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2019-03-20 10:13:42 +0100 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-03-20 10:28:19 +0100 |
| commit | 434f033c81d00429c5523c01b20d4f6c360e9e57 (patch) | |
| tree | 5f85aa55cc4c065b3a6fcd0ef0c1ecf2fdfcb55f /doc | |
| parent | e7945052695bac517b488a180fa5bda10003c158 (diff) | |
| download | astroid-git-434f033c81d00429c5523c01b20d4f6c360e9e57.tar.gz | |
Add the Tidelift subscription notification and badge
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/index.rst | 49 | ||||
| -rw-r--r-- | doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png | bin | 0 -> 4069 bytes |
2 files changed, 47 insertions, 2 deletions
diff --git a/doc/index.rst b/doc/index.rst index 4b28cf36..7c084874 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,7 +12,53 @@ Welcome to astroid's documentation! =================================== -Contents: +**astroid** is a library for AST parsing, static analysis and inference, +currently powering most of **pylint** capabilities. + +It offers support for parsing Python source code into ASTs, similar to how +the builtin **ast** module works. On top of that, it can partially infer various +Python constructs, as seen in the following example:: + + from astroid import parse + module = parse(''' + def func(first, second): + return first + second + + func(first, second) + ''') + >>> module.body[-1] + <Expr l.3 at 0x10ab46f28> + >>> inferred = next(a.body[-1].value.infer()) + >>> inferred + <Const.int l.None at 0x10ab00588> + >>> inferred.value + 5 + + +**astroid** also allows the user to write various inference transforms for +enhancing its Python understanding, helping as well **pylint** in the process +of figuring out the dynamic nature of Python. + +Support +------- + +.. image:: media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png + :width: 75 + :alt: Tidelift + :align: left + :class: tideliftlogo + +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. + +.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-astroid?utm_source=pypi-astroid&utm_medium=referral&utm_campaign=readme + + +More information +---------------- .. toctree:: :maxdepth: 2 @@ -32,4 +78,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png b/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png Binary files differnew file mode 100644 index 00000000..317dc4d9 --- /dev/null +++ b/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png |
