summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCeridwen <ceridwenv@gmail.com>2016-01-15 15:30:35 -0500
committerCeridwen <ceridwenv@gmail.com>2016-01-15 15:30:35 -0500
commit5971b00727f50d3d971334f68d03a446acd1650d (patch)
tree0441ca0df005ff4f78dfde337977c7d0a236e23a
parent3eb2202dbdbb9e29e0ab066dfa7f7de5e7c47714 (diff)
downloadastroid-git-5971b00727f50d3d971334f68d03a446acd1650d.tar.gz
Fix typo in as_string.visit_withitem
-rw-r--r--astroid/as_string.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/astroid/as_string.py b/astroid/as_string.py
index 54cd29ac..d99aee0a 100644
--- a/astroid/as_string.py
+++ b/astroid/as_string.py
@@ -410,8 +410,9 @@ class AsStringVisitor(object):
return 'with %s:\n%s' % (items, self._stmt_list(node.body))
def visit_withitem(self, node):
- return ('(%s)' % node.context_expr.accept(self) + ' as (%s)' %
- (node.optional_vars.accept(self)) if node.optional_vars else '')
+ return ('(%s)' % node.context_expr.accept(self) +
+ (' as (%s)' % node.optional_vars.accept(self)
+ if node.optional_vars else ''))
def visit_yield(self, node):
"""yield an ast.Yield node as string"""