Repository navigation
Read nopep8 in Any Letter Case in the Prose Gate - #2827
Conversation
pycodestyle reads `nopep8` in any letter case, but the prose gate matched it only in lower case, so `# NOPEP8` and `# NoPep8: E501` in a `.py` file were judged as new prose comments. `TOOL_DIRECTIVE` now reads the name in any case, and `TRAILING_DIRECTIVE` cuts a trailing `# nopep8` in any case, as it already did for `noqa`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
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 |
There was a problem hiding this comment.
🔵 Needs a closer look
nopep8 must also be added to NOT_PROSE to prevent comment-case findings.
0 open findings
What changed in this PR
This pull request updates the prose gate to recognize case-insensitive nopep8 directives, including trailing forms.
Changes:
- Updated directive matching and documentation.
- Added regression tests for leading and trailing spellings.
NOT_PROSEstill needs to exemptnopep8from other prose rules.
| File | Summary |
|---|---|
tests/test_prose_lint.py |
Adds coverage for case-insensitive leading and trailing directives. |
.github/actions/prose-gate/prose_lint.py |
Updates directive matching and documentation; requires NOT_PROSE coverage. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2827 +/- ##
========================================
Coverage 60.31% 60.31%
========================================
Files 16 16
Lines 8479 8479
========================================
Hits 5114 5114
Misses 3365 3365
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Answering the Copilot round on head 895fae8, whose verdict headline counts no finding (0 findings in its block):
Deferred to #2828. The behavior is real but pre-existing rather than introduced here. |
|
@coderabbitai review |
|
…ilure Reporting Fixes to Main (#2816) ## Summary Promotes these pull requests from develop to main: - #2832 Require Every CLI Script to Answer Help and Refuse Unknown Arguments - #2833 Exempt nopep8 as a Leading Directive in the Prose Gate - #2815 Bind the Workspace-Edit Rule Only to an Agent Running Inside VS Code - #2813 Record HomeAssistant-Config's Incidental Python as a driftNote - #2827 Read nopep8 in Any Letter Case in the Prose Gate - #2825 Spend a Head Refusal a Later Genuine Round on That Head Answers - #2819 Read noqa and CSpell Directives in Any Letter Case - #2814 Judge the Prose in Front of a Trailing noqa or pylint Directive - #2811 Name Why a Windows Tool Install Failed and Print Docker's Status in UTF-8 - #2808 Read a Tool Name as a Prose Gate Directive Only Where It Opens the Comment - #2802 Name a File the Prose Gate Cannot Decode in Its Scope Line - #2800 Read a First-Line Comment After a Byte Order Mark as Leading in Every Language - #2797 Name a Python File the Prose Gate Cannot Parse in Its Scope Line - #2794 Let the Unattended Orchestrator Retry a Transient Dispatch Failure - #2792 Close the Remaining Blocked-Promotion Gaps in the Unattended Worker - #2790 Read a Carried Change Set Past the Compare Endpoint's 300-File Ceiling - #2784 Let a Round on the Head Outrank pr_review.py wait's Repo-Wide Quota Reading - #2782 Say What pr_review.py wait --min-rounds Counts and Name It at the Timeout - #2778 Share the Bounded Step Reader Across the Test Harnesses - #2776 Pin the Prose Gate's Override Wiring by Structure - #2773 Exempt a List Item's Label Separator from the Dash Rule for Every Marker and Bold Spelling - #2771 Strip a List Item's Opening Label for Every Marker and Bold Spelling in the Prose Gate - #2768 Page pr_review.py's Changed-File List Past 100 So a Large Promotion Can State Coverage - #2765 Let an Attested Local Pass Cover a Head Beside a Table-Less Copilot Round Closes #2285 Closes #2820 Closes #2818 Closes #2809 Closes #2807 Closes #1659 Closes #2796 Closes #2798 Closes #2163 Closes #1984 Closes #2614 Closes #2767 Closes #2781 Closes #2741 Closes #2775 Closes #1665 Closes #2770 Closes #2738 Closes #2758 Closes #2739 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
nopep8in any letter case, since it compiles its inline pattern# no(?:qa|pep8)\bwithre.I. The prose gate'sTOOL_DIRECTIVEmatchednopep8only in lower case, so# NOPEP8and# NoPep8: E501in a.pyfile were judged as new prose comments and drewcomment-added.TOOL_DIRECTIVEnow readsnopep8in any case.TRAILING_DIRECTIVEdid not listnopep8at all, so prose followed by a trailing# nopep8on the same line was not cut. It now cuts a trailingnopep8in any case, as it already did fornoqa.without_trailing_directivedocstring namesnopep8besidenoqaandtype: ignore.prose_lint.pychange reverted, 5 subtests fail.Closes on promotion: #2818
🤖 Generated with Claude Code