Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove the # coding, since PEP3120 the default is UTF8 | Pierre Sassoulas | 2021-02-17 | 1 | -1/+0 |
| | |||||
* | Update copyright notice | hippo91 | 2021-02-15 | 1 | -1/+1 |
| | |||||
* | Corrected the parent of function type comment nodes | Ashley Whetter | 2021-02-07 | 1 | -4/+4 |
| | | | | | | | These nodes used to be parented to their original ast.FunctionDef parent but are now correctly parented to their astroid.FunctionDef parent. Closes #851 | ||||
* | Restructure the AST parsing heuristic to always pick the same module | Claudiu Popa | 2020-04-29 | 1 | -70/+27 |
| | | | | | | | | | | | | | | 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 | ||||
* | Add missing copyright annotations for the past releases | Claudiu Popa | 2020-04-27 | 1 | -1/+7 |
| | |||||
* | Merge TreeRebuilder3 into TreeRebuilder | Claudiu Popa | 2020-03-12 | 1 | -165/+111 |
| | | | | | | | These were separated to allow us to add support for parsing Python 2 files as well as Python 3. Unfortunately that is no longer in our plans and since the code was already broken (e.g. the Raise node was receiving unexpected arguments), it's better to rip the bandaid and merge the two classes together. | ||||
* | Revert the redefinition of type_comment_kwonlyargs | Claudiu Popa | 2020-01-12 | 1 | -1/+0 |
| | |||||
* | Make sure type_comment_kwonlyargs is set as well | Claudiu Popa | 2020-01-12 | 1 | -0/+1 |
| | |||||
* | Fix unbound local error caused by 061aaebea2be2d21831ef687cc4ba4a25d953c65 | Claudiu Popa | 2020-01-12 | 1 | -0/+1 |
| | |||||
* | Can access positional only and keyword only argument type comments | Ashley Whetter | 2020-01-11 | 1 | -0/+10 |
| | |||||
* | Spelling fixes (#706) | Ville Skyttä | 2019-10-16 | 1 | -2/+2 |
| | |||||
* | All type comments have as parent the corresponding `astroid` node | Claudiu Popa | 2019-10-09 | 1 | -7/+9 |
| | | | | | | | Until now they had as parent the builtin `ast` node which meant we were operating with primitive objects instead of our own. Close PyCQA/pylint#3174 | ||||
* | Remove redundant compatibility code (#693) | Hugo van Kemenade | 2019-09-10 | 1 | -48/+29 |
| | |||||
* | Introduce a new argument to `Arguments` for storing the positional only ↵ | Claudiu Popa | 2019-07-09 | 1 | -0/+7 |
| | | | | | | | | | annotations The annotations were stored until now in `.annotations` and `kwonlyargs_annotations`, but given the addition of `posonlyargs`, we need to store the positional only annotations somewhere else as well. This new attribute should simplify the handling of annotations for both positional only and positional or keyword parameters. | ||||
* | Add support for positional only arguments in astroid for python 3.8 | Claudiu Popa | 2019-07-09 | 1 | -0/+4 |
| | |||||
* | Grab the Constant value on Python 3.8+ | Claudiu Popa | 2019-07-07 | 1 | -1/+2 |
| | |||||
* | Grab only Constant strings for docstrings | Claudiu Popa | 2019-07-06 | 1 | -12/+10 |
| | |||||
* | Fix formatting | Claudiu Popa | 2019-07-06 | 1 | -2/+4 |
| | |||||
* | Fix finding of docstring under python3.8 | Zbigniew Jędrzejewski-Szmek | 2019-07-06 | 1 | -2/+4 |
| | | | | | | | It is stored as a Constant, not a Str, so we the the value a bit differently. Fixes one test failure in https://github.com/gristlabs/asttokens/issues/28. | ||||
* | Maintain the same line number for decorators for Python 3.8+ | Claudiu Popa | 2019-06-04 | 1 | -4/+8 |
| | |||||
* | Set the line number of decorated functions for python 3.8 | Claudiu Popa | 2019-06-02 | 1 | -1/+15 |
| | | | | | | | | | | Python 3.8 sets the line number of a decorated function to be the actual line number of the function, but the previous versions expected the decorator's line number instead. We reset the function's line number to that of the first decorator to maintain backward compatibility. It's not ideal but this discrepancy was baked into the framework for *years*. | ||||
* | Add support for Python 3.8's `NamedExpr` nodes, which is part of assignment ↵ | Claudiu Popa | 2019-06-01 | 1 | -0/+7 |
| | | | | | | expressions. Close #674 | ||||
* | Can access per argument type comments (#667) | Ashley Whetter | 2019-05-14 | 1 | -0/+2 |
| | | | Close #665 | ||||
* | Remove else after return/raise | Tomas Gavenciak | 2018-12-11 | 1 | -1/+1 |
| | |||||
* | Initial formatting of astroid | Claudiu Popa | 2018-10-02 | 1 | -285/+354 |
| | |||||
* | Reflect AST changes in Python 3.8. | Serhiy Storchaka | 2018-09-30 | 1 | -0/+11 |
| | | | | | | | | * Num, Str, Bytes, Ellipsis and NameConstant are replaced with Constant. (https://bugs.python.org/issue32892) * Index is replaced with its value, ExtSlice is replaced with Tuple. (https://bugs.python.org/issue34822) | ||||
* | Spelling fixes | Ville Skyttä | 2018-07-24 | 1 | -3/+3 |
| | |||||
* | Update the copyright noticesastroid-2.0 | Claudiu Popa | 2018-07-15 | 1 | -2/+12 |
| | |||||
* | Fix useless-object-inheritance lint error (#573) | Nick Drozd | 2018-06-28 | 1 | -1/+1 |
| | | | See https://github.com/PyCQA/pylint/pull/2209 | ||||
* | Fix linting | Claudiu Popa | 2018-06-14 | 1 | -3/+3 |
| | |||||
* | Remove useless TODOs that are either issues in the issue tracker or things ↵ | Claudiu Popa | 2018-06-12 | 1 | -1/+0 |
| | | | | which we'll never get to fix/change | ||||
* | Add support for parsing function type comments | Claudiu Popa | 2018-06-04 | 1 | -5/+32 |
| | | | | | | 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 Popa | 2018-05-23 | 1 | -96/+148 |
| | |||||
* | Get rid of the astpeephole (it's not an actual peephole and it's optimized ↵ | Claudiu Popa | 2018-05-13 | 1 | -19/+0 |
| | | | | just for once single use case | ||||
* | Module.__path__ is now a list | Claudiu Popa | 2018-03-30 | 1 | -1/+2 |
| | | | | | | | | | It used to be a string containing the path, but it doesn't reflect the situation on Python, where it is actually a list. Also fix a bug with namespace package's __path__ attribute, which wasn't using the module's __path__, but its file attribute, which is None for namespace packages. Close #528 | ||||
* | Fix lint errors | Bryce Guinta | 2018-02-26 | 1 | -0/+1 |
| | |||||
* | Fix lint errors | Claudiu Popa | 2018-02-04 | 1 | -2/+2 |
| | |||||
* | Switch the order of the docstring checks to have the .docstring extractor first | Claudiu Popa | 2018-02-04 | 1 | -6/+6 |
| | |||||
* | Use the .docstring attribute on Python 3.7 if it exists | Claudiu Popa | 2018-02-04 | 1 | -1/+8 |
| | | | | | This attribute contains now the actual docstring, it is not in the body of the function/class/node as it was until now. | ||||
* | Drop support for EOL Python 3.3 | Hugo | 2017-12-15 | 1 | -7/+0 |
| | |||||
* | Fix lint warnings | Claudiu Popa | 2017-10-12 | 1 | -0/+1 |
| | |||||
* | Arguments node gained a new attribute, kwonlyargs_annotations, for holding ↵ | Claudiu Popa | 2017-04-12 | 1 | -2/+16 |
| | | | | the keyword-only args annotations | ||||
* | Add support for asynchronous comprehensions (#400) | Łukasz Rogalski | 2017-03-01 | 1 | -1/+2 |
| | | | Closes #399 | ||||
* | Add support for Python 3.6's annotated assignment nodes | rr- | 2017-02-09 | 1 | -1/+12 |
| | |||||
* | Fix metaclass detection when multiple keyword arguments are used in ClassDef ↵ | Łukasz Rogalski | 2017-02-09 | 1 | -1/+1 |
| | | | | (#402) | ||||
* | Make ClassDefs support keyword arguments. (#384) | Derek Gustafson | 2017-01-22 | 1 | -1/+3 |
| | |||||
* | Remove occurrences of no-else-return and consider-using-ternary | Claudiu Popa | 2016-12-18 | 1 | -2/+2 |
| | |||||
* | Remove pylint errors | Derek Gustafson | 2016-12-03 | 1 | -1/+1 |
| | |||||
* | add format string support (#365) | Jared Garst | 2016-10-24 | 1 | -0/+12 |
| | | | Format strings require support for two new nodes, FormattedValue, respectively JoinedStr. | ||||
* | Even more granular copyrights (thanks to copyrite) | Claudiu Popa | 2016-07-22 | 1 | -2/+5 |
| |