You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Was dropping docstrings! Add in decompyle make_function36
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
|
||||
from xdis.code import iscode
|
||||
from uncompyle6.parsers.treenode import SyntaxTree
|
||||
|
||||
from uncompyle6 import PYTHON3
|
||||
@@ -173,6 +174,15 @@ def print_docstring(self, indent, docstring):
|
||||
self.println(lines[-1], quote)
|
||||
return True
|
||||
|
||||
def find_code_node(node, start):
|
||||
for i in range(-start, len(node) + 1):
|
||||
if node[-i].kind == "LOAD_CODE":
|
||||
code_node = node[-i]
|
||||
assert iscode(code_node.attr)
|
||||
return code_node
|
||||
pass
|
||||
assert False, "did not find code node starting at %d in %s" % (start, node)
|
||||
|
||||
|
||||
def flatten_list(node):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user