From 5e8f9c3f1c647938b262b47c66e241dcbd74c52f Mon Sep 17 00:00:00 2001 From: Robert Blackhart Date: Tue, 14 Apr 2026 18:58:23 -0400 Subject: [PATCH 1/3] Apply suggested fix to recline/repl/shell.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- recline/repl/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recline/repl/shell.py b/recline/repl/shell.py index 34ad256..b014a3e 100644 --- a/recline/repl/shell.py +++ b/recline/repl/shell.py @@ -242,7 +242,7 @@ def _setup_repl(program_name: str, prompt: str, history_file: str, argv: List[st if sys.platform != "win32": # set up a handler for ctrl-\ - def signal_handler(signum, frame): + def signal_handler(_signum, _frame): raise builtin_commands.DebugInterrupt() signal.signal(signal.SIGQUIT, signal_handler) From 1a4f678c2a4e20160459b0a3a67f61854106c83e Mon Sep 17 00:00:00 2001 From: Robert Blackhart Date: Tue, 14 Apr 2026 18:58:23 -0400 Subject: [PATCH 2/3] Apply suggested fix to recline/repl/shell.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- recline/repl/shell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recline/repl/shell.py b/recline/repl/shell.py index b014a3e..ee7dd30 100644 --- a/recline/repl/shell.py +++ b/recline/repl/shell.py @@ -213,9 +213,6 @@ def run_one_command(current_input: str) -> int: pass except (ReclineTypeError, ReclineCommandError) as exc: print(str(exc)) - except Exception as exc: # pylint: disable=broad-except - print(f"Command execution error: {exc}") - traceback.print_exc() except SystemExit as exc: if exc.code == builtin_commands.EXIT_COMMAND_CODE: raise @@ -224,6 +221,9 @@ def run_one_command(current_input: str) -> int: # type one of the required parameters yet. We might also get here if they # printed the help output with -help return exc.code + except Exception as exc: # pylint: disable=broad-except + print(f"Command execution error: {exc}") + traceback.print_exc() return 1 From 10734fe2cc9506b501068d71a5845453ba76b487 Mon Sep 17 00:00:00 2001 From: Robert Blackhart Date: Tue, 14 Apr 2026 18:58:24 -0400 Subject: [PATCH 3/3] Apply suggested fix to recline/repl/shell.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- recline/repl/shell.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/recline/repl/shell.py b/recline/repl/shell.py index ee7dd30..310e438 100644 --- a/recline/repl/shell.py +++ b/recline/repl/shell.py @@ -112,41 +112,41 @@ def _split_unquoted(current_input: str, separator: str) -> List[str]: """Split `current_input` on `separator` only when outside quoted strings.""" parts: List[str] = [] start = 0 - i = 0 + position = 0 in_single = False in_double = False escaped = False - while i < len(current_input): - char = current_input[i] + while position < len(current_input): + char = current_input[position] if escaped: escaped = False - i += 1 + position += 1 continue if char == "\\": escaped = True - i += 1 + position += 1 continue if char == "'" and not in_double: in_single = not in_single - i += 1 + position += 1 continue if char == '"' and not in_single: in_double = not in_double - i += 1 + position += 1 continue - if not in_single and not in_double and current_input.startswith(separator, i): - parts.append(current_input[start:i]) - i += len(separator) - start = i + if not in_single and not in_double and current_input.startswith(separator, position): + parts.append(current_input[start:position]) + position += len(separator) + start = position continue - i += 1 + position += 1 parts.append(current_input[start:]) return parts