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>
This commit is contained in:
Mohd Kaif
2026-06-04 17:18:37 +05:30
committed by GitHub
co-authored by Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
parent 4f1740e19c
commit a41b587bc9
+4 -2
View File
@@ -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: