From a41b587bc9cdda1a53d3550fb341feadf53a69df Mon Sep 17 00:00:00 2001 From: Mohd Kaif <98801504+KaifAhmad1@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:18:37 +0530 Subject: [PATCH] Potential fix for pull request finding 'Empty except' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- semantica/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/semantica/cli.py b/semantica/cli.py index 941d76d4..3e401a9c 100644 --- a/semantica/cli.py +++ b/semantica/cli.py @@ -622,9 +622,11 @@ def shell(ctx: click.Context) -> None: with cmd.make_context(cmd_name, args[1:], parent=ctx) as sub_ctx: cmd.invoke(sub_ctx) except click.exceptions.Exit: - pass + # Subcommands may request termination via Click's Exit; keep REPL alive. + continue except SystemExit: - pass + # Some commands/libraries may raise SystemExit; do not exit the shell loop. + continue except click.ClickException as exc: exc.show() except Exception as exc: