fix(cli): stop a prose mention of a noqa code from parsing as a directive#303
Conversation
…tive `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.
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
ruff checkemits this on every run that covers 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 what follows — the closing backtick makes the code list invalid.Why bother
It never fails anything: it is a warning, and
trunk checkis clean with it. But it is permanent, and ruff reports a genuinely typo'd directive through the same channel. A false warning standing forever is how the real one gets scrolled past.The fix
Drop the leading hash from the in-prose mention, so there is no directive to parse — and record why, so it is not helpfully restored later. The surrounding guidance is unchanged and still accurate.
Verified by probe: only the
`# noqa: F401`form trips it;`noqa: F401`and plain-prose forms do not.Verification
ruff@0.15.17 check src/bmad_loop/cli.py→ the warning above.src/bmad_loop/→ zero invalid-directive warnings.trunk check --no-fixclean;tests/test_cli.py253 passed.Comment-only — no behavior change.