From b5b0b889e02b4f4a6a7d6034e382a3de912bcb1a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 26 Jun 2026 13:11:20 +0000 Subject: [PATCH] fix: prevent Rich from wrapping non-callable-main error across lines Rich's console.print() was word-wrapping a long error message at the default terminal width, splitting the phrase "not callable" across two lines ("not\ncallable"). This caused the test assertion `"not callable" in result.output` to fail. Adding soft_wrap=True to the affected print call disables Rich's word-wrapping for that line, keeping the key phrase on a single line regardless of the path length. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_013EMfjMjNvvj1p3HYjbJXQe --- macfleet/cli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macfleet/cli/main.py b/macfleet/cli/main.py index ed5c430..bac6816 100644 --- a/macfleet/cli/main.py +++ b/macfleet/cli/main.py @@ -861,7 +861,7 @@ def _train_from_script( if hasattr(module, "main"): main_fn = module.main if not callable(main_fn): - console.print(f"[red]Error: Script attribute 'main' in {script} is not callable.[/red]") + console.print(f"[red]Error: Script attribute 'main' in {script} is not callable.[/red]", soft_wrap=True) console.print("[dim]Define a function named main(), then retry.[/dim]") sys.exit(1) options = {