Skip to content

fix(cli): stop a prose mention of a noqa code from parsing as a directive#303

Merged
pbean merged 1 commit into
mainfrom
fix/cli-invalid-noqa-directive
Jul 25, 2026
Merged

fix(cli): stop a prose mention of a noqa code from parsing as a directive#303
pbean merged 1 commit into
mainfrom
fix/cli-invalid-noqa-directive

Conversation

@pbean

@pbean pbean commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

What

ruff check emits this on every run that covers the package:

warning: Invalid `# noqa` directive on src/bmad_loop/cli.py:78:
expected code to consist of uppercase letters followed by digits only (e.g. `F401`)

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 check is 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

  • Before: ruff@0.15.17 check src/bmad_loop/cli.py → the warning above.
  • After: same command over src/bmad_loop/zero invalid-directive warnings.
  • trunk check --no-fix clean; tests/test_cli.py 253 passed.

Comment-only — no behavior change.

…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.
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@pbean, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 092d3f20-152d-42e0-a1cb-3f8134e85c5f

📥 Commits

Reviewing files that changed from the base of the PR and between 6672312 and 2e0ad1a.

📒 Files selected for processing (1)
  • src/bmad_loop/cli.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cli-invalid-noqa-directive

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pbean
pbean merged commit a82be01 into main Jul 25, 2026
10 checks passed
@pbean
pbean deleted the fix/cli-invalid-noqa-directive branch July 25, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant