Skip to content

Commit 14211ea

Browse files
author
rkern
committed
BUG: Correct the import normalization to account for explicit relative imports.
git-svn-id: https://svn.enthought.com/svn/sandbox/grin/trunk@82 b5260ef8-a2c4-4e91-82fd-f242746c304a
1 parent 9b8c8e4 commit 14211ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/grinimports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def normalize_From(node):
2121
"""
2222
statements = []
2323
children = node.getChildren()
24-
module = children[0]
24+
module = '.'*node.level + node.modname
2525
for name, asname in children[1]:
2626
line = 'from %s import %s' % (module, name)
2727
if asname is not None:

0 commit comments

Comments
 (0)