From 1a3f2b8ab018aab0d17ecadfc49bf2dfed5809f5 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 21 Jul 2024 17:34:06 -0400 Subject: [PATCH] Misc lint --- uncompyle6/parsers/reducecheck/except_handler.py | 5 +++-- uncompyle6/parsers/reducecheck/ifelsestmt.py | 2 +- uncompyle6/semantics/consts.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/uncompyle6/parsers/reducecheck/except_handler.py b/uncompyle6/parsers/reducecheck/except_handler.py index 8d2341d9b..af64be2d9 100644 --- a/uncompyle6/parsers/reducecheck/except_handler.py +++ b/uncompyle6/parsers/reducecheck/except_handler.py @@ -1,7 +1,8 @@ # Copyright (c) 2020 Rocky Bernstein + def except_handler(self, lhs, n, rule, ast, tokens, first, last): - end_token = tokens[last-1] + end_token = tokens[last - 1] # print("XXX", first, last) # for t in range(first, last): @@ -13,7 +14,7 @@ def except_handler(self, lhs, n, rule, ast, tokens, first, last): if self.version[:2] == (1, 4): return False - # Make sure come froms all come from within "except_handler". + # Make sure COME_FROMs froms come from within "except_handler". if end_token != "COME_FROM": return False return end_token.attr < tokens[first].offset diff --git a/uncompyle6/parsers/reducecheck/ifelsestmt.py b/uncompyle6/parsers/reducecheck/ifelsestmt.py index 7e7bff9e8..e5f295a72 100644 --- a/uncompyle6/parsers/reducecheck/ifelsestmt.py +++ b/uncompyle6/parsers/reducecheck/ifelsestmt.py @@ -172,7 +172,7 @@ def ifelsestmt(self, lhs, n, rule, tree, tokens, first, last): if raise_stmt1 == "raise_stmt1" and raise_stmt1[0] in ("LOAD_ASSERT",): return True - # Make sure all the offsets from the "come froms" at the + # Make sure all the offsets from the "COME_FROMs" at the # end of the "if" come from somewhere inside the "if". # Since the come_froms are ordered so that lowest # offset COME_FROM is last, it is sufficient to test diff --git a/uncompyle6/semantics/consts.py b/uncompyle6/semantics/consts.py index 7ea9967bc..b7e12d4f7 100644 --- a/uncompyle6/semantics/consts.py +++ b/uncompyle6/semantics/consts.py @@ -433,7 +433,7 @@ # function_def_async "mkfuncdeco0": ("%|def %c\n", (0, ("mkfunc", "mkfunc_annotate"))), - # In cases where we desire an explict new line. + # In cases where we desire an explicit new line. # After docstrings which are followed by a "def" is # one situations where Python formatting desires two newlines, # and this is added, as a transformation rule.