diff options
| author | Ceridwen <ceridwenv@gmail.com> | 2016-01-15 11:34:47 -0500 |
|---|---|---|
| committer | Ceridwen <ceridwenv@gmail.com> | 2016-01-15 11:34:47 -0500 |
| commit | c83f62df489fb9bb6918de51001e62badfc2f536 (patch) | |
| tree | 33208e8f5c468e72f841c8b366f08da5e4669b0b | |
| parent | 99a3870d4ba212a036dd629ad9ee020333009425 (diff) | |
| download | astroid-git-c83f62df489fb9bb6918de51001e62badfc2f536.tar.gz | |
Fix typos for visit_withitem in as_string, forward visit_asyncwith correctly in rebuilder
| -rw-r--r-- | astroid/as_string.py | 2 | ||||
| -rw-r--r-- | astroid/tree/rebuilder.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/astroid/as_string.py b/astroid/as_string.py index 7f59f88c..54cd29ac 100644 --- a/astroid/as_string.py +++ b/astroid/as_string.py @@ -411,7 +411,7 @@ class AsStringVisitor(object): def visit_withitem(self, node): return ('(%s)' % node.context_expr.accept(self) + ' as (%s)' % - (optional_vars.accept(self)) if optional_vars else '') + (node.optional_vars.accept(self)) if node.optional_vars else '') def visit_yield(self, node): """yield an ast.Yield node as string""" diff --git a/astroid/tree/rebuilder.py b/astroid/tree/rebuilder.py index 12b9388c..8c6baa9a 100644 --- a/astroid/tree/rebuilder.py +++ b/astroid/tree/rebuilder.py @@ -829,7 +829,7 @@ class TreeRebuilder3(TreeRebuilder): return newnode def visit_asyncwith(self, node, parent): - return self.visit_with(nodes.AsyncWith, node, parent) + return self.visit_with(node, parent) if sys.version_info >= (3, 0): |
