You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Keep global statements in fixed order
This commit is contained in:
@@ -1768,8 +1768,8 @@ def deparse_code(version, co, out=StringIO(), showasm=False, showast=False,
|
||||
deparsed.set_pos_info(deparsed.ast, 0, len(deparsed.text))
|
||||
deparsed.fixup_parents(deparsed.ast, None)
|
||||
|
||||
for g in deparsed.mod_globs:
|
||||
deparsed.write('# global %s ## Warning: Unused global' % g)
|
||||
for g in sorted(deparsed.mod_globs):
|
||||
deparsed.write('# global %s ## Warning: Unused global\n' % g)
|
||||
|
||||
if deparsed.ast_errors:
|
||||
deparsed.write("# NOTE: have decompilation errors.\n")
|
||||
|
Reference in New Issue
Block a user