Imports yet again

This commit is contained in:
rocky
2018-03-01 08:45:31 -05:00
parent a0e3759f76
commit ef076c065b

View File

@@ -1295,9 +1295,15 @@ class SourceWalker(GenericASTTraversal, object):
relative_path_index = 0
if self.version >= 2.5:
if node[relative_path_index].attr > 0:
node[2].pattr = '.' * (node[relative_path_index].pattr + node[2].attr)
if isinstance(node[1].pattr, tuple):
node[1].pattr = '.'.join(node[1].pattr)
node[2].pattr = ('.' * node[relative_path_index].pattr) + node[2].pattr
if self.version > 2.7:
if isinstance(node[1].pattr, tuple):
imports = node[1].pattr
for pattr in imports:
node[1].pattr = pattr
self.default(node)
return
pass
self.default(node)
n_import_from_star = n_import_from