Skip to content

Read the Six Remaining Layouts the Sentence-Length Check Misread - #2872

Merged
ptr727 merged 2 commits into
developfrom
feature/fix-2865-sentence-length-layouts
Oct 12, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/fix-2865-sentence-length-layouts

Conversation

@ptr727

@ptr727 ptr727 commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Fixes #2865

Per item, every one fixed, each with a test that fails with its fix reverted:

  1. Multi-word bare NumPy type before a blank: fixed (a short unpunctuated line, a blank, then a deeper line is a head).
  2. Code-only docstring body with the closing quotes left of the quote column: fixed (such a closer sets no margin).
  3. Star-only line in a block comment: fixed (treated as a gap, as a bare # or // marker is).
  4. One dedented line moving the docstring margin: fixed for a bare URL left of the quotes. Any other dedented line still sets the margin, because dropping them all misread a body wholly indented less than the quotes.
  5. Colon summary on the quote line with a deep body after a blank: fixed (a body past a blank sits at the margin). A colon summary directly followed by a deeper line is still code.
  6. NumPy sentence ending in a colon or other closing punctuation over an indented line: fixed (it is prose, not a head).

Known accepted edge: a colon summary whose only body is one deep code line carrying the closing quotes now reads that line as prose, since nothing else sets the margin.

No change to the sentence-length cap or any other check.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings October 12, 2026 02:28
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8904cb8f-e082-41ba-b6d0-962e6de2af59

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Star-only block-comment gaps and quote-only docstrings remain mishandled.

0 open findings

What changed in this PR

Updates the prose sentence-length parser to handle six remaining docstring and comment layouts, with regression tests.

Changes:

  • Refines NumPy and docstring margin detection.
  • Handles punctuation and indentation edge cases.
  • Adds regression coverage for affected layouts.
File Reviewed changes
tests/​test_prose_lint.py Adds regression tests for the six layouts.
.github/​actions/​prose-gate/​prose_lint.py Updates sentence-layout parsing logic.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.93%. Comparing base (672e35e) to head (bba249b).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2872   +/-   ##
========================================
  Coverage    59.93%   59.93%           
========================================
  Files           16       16           
  Lines         8627     8627           
========================================
  Hits          5171     5171           
  Misses        3456     3456           
Flag Coverage Δ
python-3.13 59.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Oct 12, 2026

Copy link
Copy Markdown
Owner Author

Copilot's headline says star-only block-comment gaps and quote-only docstrings remain mishandled, but names no layout and opens no thread. Checked on this head with constructed files: a star-only gap before an over-cap run is counted (/*, *, * <over-cap run>), a star-only gap after a colon line keeps the indented run code (/* Usage:, *, * <run> gives no finding), and a bare-""" docstring with prose after a blank is counted while an indented block after Usage: stays code. These are pinned by test_a_star_only_block_comment_line_is_a_gap_inside_a_colon_block, test_a_star_only_line_still_ends_a_block_comment_paragraph and the existing quote-alone docstring tests. Declined as unsubstantiated: no layout is given to reproduce.

@ptr727
ptr727 merged commit b04cab9 into develop Oct 12, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/fix-2865-sentence-length-layouts branch October 12, 2026 02:36
ptr727 added a commit that referenced this pull request Oct 12, 2026
…ts, and PurpleAir Directories to Main (#2874)

- #2871 corrects the audit comment on a section named on a non-Markdown
file
- #2872 reads the six remaining layouts the sentence-length check
misread
- #2873 declares the PurpleAir integration's Python directories and
ticks its gate adoption

Closes #2868
Closes #2865
Closes #2848

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

2 participants