summaryrefslogtreecommitdiff
path: root/astroid/_ast.py
Commit message (Collapse)AuthorAgeFilesLines
* Drop support for Python 3.7 (#2137)Marc Mueller2023-04-231-88/+45
|
* [PyCQA migration] Upgrade links to the repositories in code and docPierre Sassoulas2023-03-291-2/+2
|
* Initial pass with ``pydocstringformatter``Daniël van Noord2023-01-091-1/+1
|
* Misc type stuff (#1888)Nick Drozd2022-12-151-0/+2
|
* Update typing for Python 3.7 (1) (#1555)Marc Mueller2022-05-131-14/+16
|
* Add annotations for ParserModule (#1526)Marc Mueller2022-04-231-23/+30
|
* Simplify hard to maintain copyright notice (#1441)Pierre Sassoulas2022-03-121-0/+4
| | | | | | | | | | | | | | * Simplify hard to maintain copyright notice git is the source of truth for the copyright, copyrite (the tool) was taking exponentially longer with each release, and it's polluting the code with sometime as much as 50 lines of names. * Add a pre-commit hook to check the copyright notice * Fix the existing file so they have a notice * Fix the spacing after the copyright notice * Add a script to generate the CONTRIBUTORS.txt Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* Add typing to ``_ast`` (#1296)Daniël van Noord2021-12-161-14/+11
|
* Rename non obvious PY3X constant to PY3X_PLUSPierre Sassoulas2021-06-211-3/+3
| | | | See https://github.com/PyCQA/astroid/pull/1069\#issuecomment-865206120
* Rename astroid.constants to astroid.constPierre Sassoulas2021-06-191-1/+1
| | | | See https://github.com/PyCQA/astroid/pull/1045\#discussion_r654572722
* Proper return type for _contexts_from_modulePierre Sassoulas2021-06-191-1/+1
| | | | See https://github.com/PyCQA/astroid/pull/1045\#discussion_r654570889
* Create a permanent enum for Context instead of deleting the classPierre Sassoulas2021-06-191-8/+7
|
* Create a astroid.constants.py to avoid circular importsPierre Sassoulas2021-06-171-1/+1
| | | | And add PY3X type constants in it.
* Fix F811 redefinition of unused '_ast_py3'Pierre Sassoulas2021-05-011-2/+1
|
* Add an isort configuration in setup.cfg and apply itPierre Sassoulas2021-04-191-1/+1
| | | | Except on astroid/__init__.py because of circular imports
* Restructure the AST parsing heuristic to always pick the same moduleClaudiu Popa2020-04-291-23/+100
| | | | | | | | | | | | | | When a file contained a misplaced type annotation, we were retrying the parsing without type comments support. That second parsing was using the builtin ast module, but the rest of the tree utilities (the builder and rebuilder) were not aware of the new parsing module that was used to build the AST nodes a second time. This commit moves the logic of picking the parsing module and the corresponding AST node mapping in a single place, which can be used by both the builder and the rebuilder. Close PyCQA/pylint#3540 Close #773
* Retry parsing a module that has invalid type commentsClaudiu Popa2019-11-261-5/+10
| | | | | | | | It is possible for a module to use comments that might be interpreted as type comments by the `ast` library. We do not want to completely crash on those invalid type comments. Close #708
* Obtain type comments on Python 3.8 by passing type_comments=True to the ↵Claudiu Popa2019-07-101-2/+5
| | | | parse function
* Fallback to the builtin ast on Python 3.8 when typed_ast is not availableClaudiu Popa2019-07-091-0/+6
|
* When picking the parse function, make sure to parse with the right minor versionastroid-2.2.0Claudiu Popa2019-02-271-1/+7
| | | | | Until now we were parsing with the default 3.6 with typed_ast, which does not make sense for Python 3.5 and 3.4
* Update to typed-ast 1.3 and drop the Python 3.7 restrictionClaudiu Popa2019-02-191-5/+0
| | | | Close #646
* Initial formatting of astroidClaudiu Popa2018-10-021-7/+3
|
* Don't use typed_ast is the Python version is 3.7+Claudiu Popa2018-06-091-0/+5
| | | | | typed_ast doesn't fully support the complete syntax of 3.7 which will result in SyntaxErrors when building trees with 3.7 specific syntax.
* Add support for parsing function type commentsClaudiu Popa2018-06-041-0/+17
| | | | | | This commit exposes two new attributes to the FunctionDef nodes, type_comment_args respectively type_comment_annotations. These two attributes hold the type annotations provided via type comments.
* Add support for type comments (#548)Claudiu Popa2018-05-231-0/+21