From d2a171609e3522109c031ff60e65851ac87417ca Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 24 Feb 2024 12:56:30 -0500 Subject: [PATCH] Remove messed-up show_tree call --- uncompyle6/semantics/make_function36.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/uncompyle6/semantics/make_function36.py b/uncompyle6/semantics/make_function36.py index 863c4995..a976e996 100644 --- a/uncompyle6/semantics/make_function36.py +++ b/uncompyle6/semantics/make_function36.py @@ -17,22 +17,21 @@ All the crazy things we have to do to handle Python functions in 3.6 and above. The saga of changes before 3.6 is in other files. """ from xdis import ( - iscode, + CO_ASYNC_GENERATOR, + CO_GENERATOR, code_has_star_arg, code_has_star_star_arg, - CO_GENERATOR, - CO_ASYNC_GENERATOR, + iscode, ) -from uncompyle6.scanner import Code -from uncompyle6.semantics.parser_error import ParserError + from uncompyle6.parser import ParserError as ParserError2 +from uncompyle6.scanner import Code from uncompyle6.semantics.helper import ( find_all_globals, find_globals_and_nonlocals, find_none, ) - -from uncompyle6.show import maybe_show_tree_param_default +from uncompyle6.semantics.parser_error import ParserError def make_function36(self, node, is_lambda, nested=1, code_node=None): @@ -55,7 +54,6 @@ def make_function36(self, node, is_lambda, nested=1, code_node=None): - handle format tuple parameters """ value = default - maybe_show_tree_param_default(self.showast, name, value) if annotation: result = "%s: %s=%s" % (name, annotation, value) else: @@ -150,7 +148,7 @@ def make_function36(self, node, is_lambda, nested=1, code_node=None): kwonlyargcount = code.co_kwonlyargcount paramnames = list(scanner_code.co_varnames[:argc]) - kwargs = list(scanner_code.co_varnames[argc: argc + kwonlyargcount]) + kwargs = list(scanner_code.co_varnames[argc : argc + kwonlyargcount]) paramnames.reverse() defparams.reverse() @@ -181,7 +179,7 @@ def make_function36(self, node, is_lambda, nested=1, code_node=None): ) ) - for param in paramnames[i + 1:]: + for param in paramnames[i + 1 :]: if param in annotate_dict: params.append("%s: %s" % (param, annotate_dict[param])) else: