From bfe2579a4098d1451cc186204554c89e393bd44a Mon Sep 17 00:00:00 2001 From: AgnieszkaZaba <56157996+AgnieszkaZaba@users.noreply.github.com> Date: Tue, 19 May 2026 12:08:58 +0200 Subject: [PATCH] Ignore KeyboardInterrupt errors in notebook output --- hooks/notebooks_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/notebooks_output.py b/hooks/notebooks_output.py index 20dcdec..cd4d823 100755 --- a/hooks/notebooks_output.py +++ b/hooks/notebooks_output.py @@ -23,7 +23,7 @@ def test_no_errors_or_warnings_in_output(notebook): if cell.cell_type == "code": for output in cell.outputs: ot = output.get("output_type") - if ot == "error": + if ot == "error" and output.get("ename") != "KeyboardInterrupt": raise ValueError( f"Cell [{cell_idx}] contain error or warning. \n\n" f"Cell [{cell_idx}] output:\n{output}\n"