| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Format strings require support for two new nodes, FormattedValue, respectively JoinedStr.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
in rebuilder
|
|
|
|
| |
3 With node.
|
|
|
|
| |
corresponding to the stdlib Compare node.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
not exist as a node in the builtin ast module.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|