You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
A recent changed bolixed docstrings...
fixa
This commit is contained in:
@@ -174,6 +174,7 @@ case $PYVERSION in
|
||||
# Figure out what's up here
|
||||
SKIP_TESTS[test_bisect.py]=1
|
||||
SKIP_TESTS[test_buffer.py]=1 # too long
|
||||
SKIP_TESTS[test_compileall.py]=1 # Something weird on POWER
|
||||
SKIP_TESTS[test_distutils.py]=1
|
||||
|
||||
SKIP_TESTS[test_exception_variations.py]=1
|
||||
|
@@ -26,7 +26,7 @@ from uncompyle6.semantics.consts import RETURN_NONE
|
||||
|
||||
def is_docstring(node):
|
||||
try:
|
||||
return node[0][0].kind == "assign" and node[0][0][1][0].pattr == "__doc__"
|
||||
return node[0].kind == "assign" and node[0][1][0].pattr == "__doc__"
|
||||
except:
|
||||
return False
|
||||
|
||||
@@ -396,11 +396,11 @@ class TreeTransform(GenericASTTraversal, object):
|
||||
"LOAD_STR",
|
||||
has_arg=True,
|
||||
offset=0,
|
||||
pattr=self.ast[i][0][0][0][0].attr,
|
||||
pattr=self.ast[i][0][0][0].pattr,
|
||||
)
|
||||
],
|
||||
transformed_by="transform",
|
||||
)
|
||||
docstring_ast.transformed_by="transform"
|
||||
del self.ast[i]
|
||||
self.ast.insert(0, docstring_ast)
|
||||
break
|
||||
|
Reference in New Issue
Block a user