A recent changed bolixed docstrings...

fixa
This commit is contained in:
rocky
2020-01-26 03:30:57 -05:00
parent ba47a8d009
commit 118e21b2cd
2 changed files with 4 additions and 3 deletions

View File

@@ -174,6 +174,7 @@ case $PYVERSION in
# Figure out what's up here # Figure out what's up here
SKIP_TESTS[test_bisect.py]=1 SKIP_TESTS[test_bisect.py]=1
SKIP_TESTS[test_buffer.py]=1 # too long 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_distutils.py]=1
SKIP_TESTS[test_exception_variations.py]=1 SKIP_TESTS[test_exception_variations.py]=1

View File

@@ -26,7 +26,7 @@ from uncompyle6.semantics.consts import RETURN_NONE
def is_docstring(node): def is_docstring(node):
try: 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: except:
return False return False
@@ -396,11 +396,11 @@ class TreeTransform(GenericASTTraversal, object):
"LOAD_STR", "LOAD_STR",
has_arg=True, has_arg=True,
offset=0, 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] del self.ast[i]
self.ast.insert(0, docstring_ast) self.ast.insert(0, docstring_ast)
break break