summaryrefslogtreecommitdiff
path: root/astroid/tree/rebuilder.py
Commit message (Collapse)AuthorAgeFilesLines
* Make ClassDefs support keyword arguments. (#384)Derek Gustafson2017-01-221-1/+3
|
* add format string support (#365)Jared Garst2016-12-301-0/+12
| | | | Format strings require support for two new nodes, FormattedValue, respectively JoinedStr.
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-221-2/+4
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
|
* Use the lineno and col_offset provided by variadics in Python 3.5+. Close #335Claudiu Popa2016-06-281-2/+4
|
* Convert all files to new license headerCeridwen2016-05-171-17/+3
|
* Changed the way how parameters are being builtClaudiu Popa2016-02-131-56/+106
| | | | | | | | | | | | | | | The old way consisted in having the parameter names, their defaults and their annotations separated in different components of the Arguments node. We introduced a new Param node, which holds the name of a parameter, its default value and its annotation. If any of the last two values are missing, then that slot will be filled with a new node kind, Empty, which is used for specifying the lack of something (None could have been used instead, but that means having non-AST nodes in the Arguments node). We're also having support for positional only arguments, for the moment only in raw_building. Close #215
* Build AsyncWith nodes correctlyCeridwen2016-01-151-3/+3
|
* Fix typos for visit_withitem in as_string, forward visit_asyncwith correctly ↵Ceridwen2016-01-151-1/+1
| | | | in rebuilder
* Refactor With nodes to have subnodes, WithItems, corresponding to the stdlib ↵Ceridwen2016-01-091-24/+19
| | | | 3 With node.
* Refactor Compare nodes to have two sequences, ops and comparators, ↵Ceridwen2016-01-081-4/+5
| | | | corresponding to the stdlib Compare node.
* Use keys and values as separate arguments for nodes.DictClaudiu Popa2016-01-041-1/+5
| | | | | | | | Dict was a bit different that the corresponding class from the builtin ast module with respect to how it was initialized. Instead of accepting a list of pairs, the initializer accepts two arguments, one for keys, the other for values. For backward compatibility, the class gained a new .items property.
* Some nodes got a new attribute, 'ctx', which tells in which context the said ↵Claudiu Popa2015-12-081-232/+240
| | | | | | | | | | | | | | | | | | | node was used. The possible values for the contexts are `Load` ('a'), `Del` ('del a'), `Store` ('a = 4') and the nodes that got the new attribute are Starred, Subscript, List and Tuple. The builtin ast module provides contexts for Name and Attribute as well, but we took a different approach in the past, by having different nodes for each type of context. For instance, Name used in a Del context is a DelName, while Name used in a Store context is AssignName. Since this is ingrained in astroid since quite some time, it makes no sense to change them as well, even though it's a loss of consistency. The patch introduces a new dependency to enum34 on older Python versions, which is used for building the three possible enum values for the contexts. Closes issue #267.
* Remove the visit method for AssignAttr in rebuilder, since AssignAttr does ↵Claudiu Popa2015-12-031-8/+0
| | | | not exist as a node in the builtin ast module.
* Merge modular-locals into 2.0Ceridwen2015-11-161-83/+59
|
* Remove useless line.Claudiu Popa2015-11-121-1/+0
|
* Remove the astpeepholeClaudiu Popa2015-11-121-21/+1
| | | | | | | | | | It was initially added in order to remove a recursion error in rebuilder, which happened when a lot of strings were added together, leading to an actual recursion error when executing the code. The peepholer was more of a constant folding algorithm rather than a real peepholer. Since it's purpose is limited and the original problem is not worth fixing in astroid, but in the user code, this is removed. Closes issue #210
* Move astpeephole in the tree namespace.Claudiu Popa2015-11-021-1/+1
|
* Move rebuilder.py into the tree namespaceClaudiu Popa2015-11-011-0/+881