From 2e0ad1aed8866700678ab016df26697aba298875 Mon Sep 17 00:00:00 2001 From: pbean Date: Sat, 25 Jul 2026 09:06:06 -0700 Subject: [PATCH] fix(cli): stop a prose mention of a noqa code from parsing as a directive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `ruff check` emitted `warning: Invalid # noqa directive on cli.py:78` on every run over the package. Line 78 is prose, not a directive: the import-block comment explains that a future caller-less re-export "would need `# noqa: F401`". Ruff scans comment TEXT for directives, finds the spelled-out `# noqa:` and tries to parse the codes after it — the closing backtick makes them invalid. Non-failing (it is a warning, and `trunk check` stays clean), but permanent, and ruff reports a genuinely typo'd directive through the same channel. A false one standing forever is how the real one gets scrolled past. Drop the leading hash from the in-prose mention so there is no directive to parse, and say why, so it is not helpfully restored later. --- src/bmad_loop/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bmad_loop/cli.py b/src/bmad_loop/cli.py index 0527d096..42ed4411 100644 --- a/src/bmad_loop/cli.py +++ b/src/bmad_loop/cli.py @@ -75,7 +75,9 @@ # used within this module (validate/mux/sweep/resume) and monkeypatched as # `cli.` by the test suite — so the seams stay importable here. Each is # genuinely referenced below, so no noqa is needed (an unused-import pin would -# itself trip RUF100); a future caller-less re-export would need `# noqa: F401`. +# itself trip RUF100); a future caller-less re-export would need a `noqa: F401` +# pin. Written without the leading hash on purpose: ruff scans comment TEXT for +# directives, so spelling one out in prose is read as a real (and malformed) one. from .runsetup import ROLES from .runsetup import make_adapters as _make_adapters from .runsetup import mux_reason_label as _mux_reason_label