summaryrefslogtreecommitdiff
path: root/rebuilder.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-07-13 22:37:50 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2014-07-13 22:37:50 +0300
commitb3176f3c546126247add99dc2ecdd58516b52b34 (patch)
tree7538521bbbb19de066e9a1b2d618c5efec18b310 /rebuilder.py
parent4b80e44c09e81e611f630896eb38e376d09094a1 (diff)
downloadastroid-git-b3176f3c546126247add99dc2ecdd58516b52b34.tar.gz
Cleanup.
Diffstat (limited to 'rebuilder.py')
-rw-r--r--rebuilder.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/rebuilder.py b/rebuilder.py
index 34b7b11a..9567d186 100644
--- a/rebuilder.py
+++ b/rebuilder.py
@@ -180,25 +180,24 @@ class TreeRebuilder(object):
# change added in 82732 (7c5c678e4164), vararg and kwarg
# are instances of `_ast.arg`, not strings
if vararg:
- annotation = None
if PY34:
if vararg.annotation:
- annotation = self.visit(vararg.annotation, newnode)
+ newnode.varargannotation = self.visit(vararg.annotation,
+ newnode)
vararg = vararg.arg
- elif PY3K:
- if node.varargannotation:
- annotation = self.visit(node.varargannotation, newnode)
- newnode.varargannotation = annotation
+ elif PY3K and node.varargannotation:
+ newnode.varargannotation = self.visit(node.varargannotation,
+ newnode)
if kwarg:
- annotation = None
if PY34:
if kwarg.annotation:
- annotation = self.visit(kwarg.annotation, newnode)
+ newnode.kwargannotation = self.visit(kwarg.annotation,
+ newnode)
kwarg = kwarg.arg
elif PY3K:
if node.kwargannotation:
- annotation = self.visit(node.kwargannotation, newnode)
- newnode.kwargannotation = annotation
+ newnode.kwargannotation = self.visit(node.kwargannotation,
+ newnode)
newnode.vararg = vararg
newnode.kwarg = kwarg
# save argument names in locals: