You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Adjust showtree() calls
This commit is contained in:
@@ -1103,7 +1103,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
|||||||
self.p.insts = p_insts
|
self.p.insts = p_insts
|
||||||
except (parser.ParserError, AssertionError) as e:
|
except (parser.ParserError, AssertionError) as e:
|
||||||
raise ParserError(e, tokens)
|
raise ParserError(e, tokens)
|
||||||
maybe_show_tree(self.showast, ast)
|
maybe_show_tree(self, ast)
|
||||||
return ast
|
return ast
|
||||||
|
|
||||||
# The bytecode for the end of the main routine has a
|
# The bytecode for the end of the main routine has a
|
||||||
@@ -1142,7 +1142,7 @@ class FragmentsWalker(pysource.SourceWalker, object):
|
|||||||
except (parser.ParserError, AssertionError) as e:
|
except (parser.ParserError, AssertionError) as e:
|
||||||
raise ParserError(e, tokens)
|
raise ParserError(e, tokens)
|
||||||
|
|
||||||
maybe_show_tree(self.showast, ast)
|
maybe_show_tree(self, ast)
|
||||||
|
|
||||||
checker(ast, False, self.ast_errors)
|
checker(ast, False, self.ast_errors)
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ def make_function3_annotate(self, node, is_lambda, nested=1,
|
|||||||
"""
|
"""
|
||||||
if default:
|
if default:
|
||||||
value = self.traverse(default, indent='')
|
value = self.traverse(default, indent='')
|
||||||
maybe_show_tree_param_default(self.showast, name, value)
|
maybe_show_tree_param_default(self, name, value)
|
||||||
result = '%s=%s' % (name, value)
|
result = '%s=%s' % (name, value)
|
||||||
if result[-2:] == '= ': # default was 'LOAD_CONST None'
|
if result[-2:] == '= ': # default was 'LOAD_CONST None'
|
||||||
result += 'None'
|
result += 'None'
|
||||||
|
@@ -2163,7 +2163,6 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
except (python_parser.ParserError, AssertionError) as e:
|
except (python_parser.ParserError, AssertionError) as e:
|
||||||
raise ParserError(e, tokens)
|
raise ParserError(e, tokens)
|
||||||
|
|
||||||
# from trepan.api import debug; debug()
|
|
||||||
maybe_show_tree(self, ast)
|
maybe_show_tree(self, ast)
|
||||||
|
|
||||||
checker(ast, False, self.ast_errors)
|
checker(ast, False, self.ast_errors)
|
||||||
|
Reference in New Issue
Block a user