You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Correct last commit
This commit is contained in:
@@ -2356,18 +2356,21 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
|
|
||||||
# The function defining a class normally returns locals().
|
# The function defining a class normally returns locals().
|
||||||
# We don't want this to show up in the source, so remove the node.
|
# We don't want this to show up in the source, so remove the node.
|
||||||
if ast == "stmts" and ast[-1] == "sstmt":
|
if len(ast):
|
||||||
return_locals_parent = ast[-1]
|
if ast == "stmts" and ast[-1] == "sstmt":
|
||||||
parent_index = 0
|
return_locals_parent = ast[-1]
|
||||||
else:
|
parent_index = 0
|
||||||
return_locals_parent = ast
|
else:
|
||||||
parent_index = -1
|
return_locals_parent = ast
|
||||||
return_locals = return_locals_parent[parent_index]
|
parent_index = -1
|
||||||
if return_locals == RETURN_LOCALS:
|
return_locals = return_locals_parent[parent_index]
|
||||||
if self.hide_internal:
|
if return_locals == RETURN_LOCALS:
|
||||||
del return_locals_parent[parent_index]
|
if self.hide_internal:
|
||||||
# else:
|
del return_locals_parent[parent_index]
|
||||||
# print stmt[-1]
|
pass
|
||||||
|
pass
|
||||||
|
# else:
|
||||||
|
# print stmt[-1]
|
||||||
|
|
||||||
globals, nonlocals = find_globals_and_nonlocals(
|
globals, nonlocals = find_globals_and_nonlocals(
|
||||||
ast, set(), set(), code, self.version
|
ast, set(), set(), code, self.version
|
||||||
|
Reference in New Issue
Block a user