You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
NT importfrom -> import_from ...
to match AST better and importstar -> import_from_star misc administrivia
This commit is contained in:
@@ -1014,13 +1014,13 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.write(iname, ' as ', sname)
|
||||
self.prune() # stop recursing
|
||||
|
||||
def n_importfrom(self, node):
|
||||
def n_import_from(self, node):
|
||||
relative_path_index = 0
|
||||
if self.version >= 2.5 and node[relative_path_index].pattr > 0:
|
||||
node[2].pattr = '.'*node[relative_path_index].pattr + node[2].pattr
|
||||
self.default(node)
|
||||
|
||||
n_importstar = n_importfrom
|
||||
n_import_from_star = n_import_from
|
||||
|
||||
def n_mkfunc(self, node):
|
||||
|
||||
|
Reference in New Issue
Block a user