diff options
Diffstat (limited to 'as_string.py')
| -rw-r--r-- | as_string.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/as_string.py b/as_string.py index 61ce44e0..62ab5e84 100644 --- a/as_string.py +++ b/as_string.py @@ -228,8 +228,8 @@ class AsStringVisitor(object): def visit_from(self, node): """return an astng.From node as string""" - modname = node.modname or '.' * node.level - return 'from %s import %s' % (modname, _import_string(node.names)) + return 'from %s import %s' % ('.' * (node.level or 0) + node.modname, + _import_string(node.names)) def visit_function(self, node): """return an astng.Function node as string""" |
