Correct 2.5-7 relative import formatting

This commit is contained in:
rocky
2022-05-14 19:28:23 -04:00
parent 656a9aa290
commit fa9cc4c669
7 changed files with 21 additions and 9 deletions

View File

@@ -48,3 +48,9 @@ def customize_for_version25(self, version):
node[1][0][0][0].kind = 'tf_tryelsestmt'
self.default(node)
self.n_tryfinallystmt = tryfinallystmt
def n_import_from(node):
if node[0].pattr > 0:
node[2].pattr = ("." * node[0].pattr) + node[2].pattr
self.default(node)
self.n_import_from = n_import_from