Contents

astroid 3.1.0

0

An abstract syntax tree for Python with inference support.

An abstract syntax tree for Python with inference support.

Stars: 509, Watchers: 509, Forks: 262, Open Issues: 172

The pylint-dev/astroid repo was created 8 years ago and the last code push was 3 hours ago.
The project is popular with 509 github stars!

How to Install astroid

You can install astroid using pip

pip install astroid

or add it to a project with poetry

poetry add astroid

Package Details

Author
License
LGPL-2.1-or-later
Homepage
PyPi:
https://pypi.org/project/astroid/
GitHub Repo:
https://github.com/PyCQA/astroid

Classifiers

  • Software Development/Libraries/Python Modules
  • Software Development/Quality Assurance
  • Software Development/Testing
No  astroid  pypi packages just yet.

Errors

A list of common astroid errors.

Code Examples

Here are some astroid code examples and snippets.

GitHub Issues

The astroid package has 172 open issues on GitHub

  • Get argument infos from method descriptors
  • Fix crash on inference of __dict__.items() of an imported module
  • Little script to prevent mypy regression before we're able to activate mypy in pre-commit
  • AstroidBuilder.add_from_names_to_locals() should use Module.wildcard_import_names(), not Module.public_names()
  • Should astroid adhere to ast's module API ?
  • Fix inference of self in a list or tuple within bin. ops.
  • Changed NodeNG.toline to use end_lineno when it is available
  • Decorator.toline is off by 1
  • Bug: ImportFrom.modname is not None on relative imports
  • Provide base visitor classes
  • Provide actual literal_eval() function. Adapted from standard library's.
  • Easy create nodes without having to call postinit()
  • Investigate use of lru_cache on methods
  • Provide base NodeVisitor class
  • Impossible to get correct line number for the docstrings

See more issues on GitHub

Related Packages & Articles

flake8 7.0.0

the modular source code checker: pep8 pyflakes and co

asteval 0.9.32

Safe, minimalistic evaluator of python expression using ast module

ply 3.11

PLY is a 100% Python implementation of the common parsing tools lex and yacc.

lxml 5.2.1

Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.