Repository navigation
Report a Word Tuple Keying a Mapping in the Vocabulary Check - #3477
Conversation
The docstring said letters alone, while the pattern also joins letter runs with single spaces, hyphens, or apostrophes, so "had had" and "sentence-length" are words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A key holding words beside a value holding none was marked nested and so never reported, since the mapping does not count it. Only a key the mapping counts is nested now. The is_word docstring names which paths and environment variable names are not words, since an all-letter name such as HOME is one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a case whose word-tuple key sits beside a value holding words, so dropping the key from the nested set would report it twice. The docstring now says the report lands on the outermost literal that counts it, and the underscore test's name says what it covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified, and all reviewed changes have approval readiness.
No open issues 🎉
What changed in this PR
This pull request clarifies vocabulary-check documentation and fixes nested-literal handling for mapping keys, with regression coverage for counted and uncounted tuple keys.
Changes:
- Clarifies the
is_wordcontract and renames the environment-name test. - Marks mapping keys as nested only when their associated values contribute words.
- Adds regression cases for counted and uncounted mapping keys.
| File | Description |
|---|---|
tests/test_prose_lint.py |
Updates vocabulary-check documentation, nested mapping logic, and regression tests. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3477 +/- ##
========================================
Coverage 80.98% 80.98%
========================================
Files 25 25
Lines 8895 8895
========================================
Hits 7204 7204
Misses 1691 1691
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:
|
…3476) ## Summary Promotes the pull requests merged into develop since release 2.0.1178. - [#3474](#3474): replaces the prose gate's line ceiling with a test that fails where `prose_lint.py` holds a banned spelling, an exemption entry, or a collection literal of more than five words. - [#3477](#3477): answers this promotion's review. The `is_word` docstring now says what its pattern accepts, and a word tuple keying a mapping beside a wordless value is reported. - [#3478](#3478): answers this promotion's second review round, a case proving paths with a `/` or `\` separator are not words. Closes #3441 ## Constituent coverage Each change this promotion carries had coverage on its own pull request into develop, at its merged head: | Pull request | Merged head | Coverage | | --- | --- | --- | | [#3474](#3474) | `9d631289` | attested local pass at the merged head, base `develop`, and a Copilot table on the merged head naming exactly its one changed file, no open findings | | [#3477](#3477) | `0999fc81` | attested local pass at the merged head, base `develop`, and a Copilot table on the merged head naming exactly its one changed file, no open findings | | [#3478](#3478) | `93ba9d90` | attested local pass at the merged head, base `develop`, and a Copilot table on the merged head naming exactly its one changed file, no open findings | 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Answers the finding promotion #3476 raised on the vocabulary check #3474 added to
tests/test_prose_lint.py.is_worddocstring said "letters alone", while its pattern joins letter runs with single spaces, hyphens, or apostrophes. It now says that. It also names which paths and environment variable names are not words, those with a separator or an underscore, since an all-letter name such asHOMEis one. The test covering them is renamed to match.KEYEDreports at the tuple, andCOUNTEDreports once, at the mapping.Verification
tests/test_prose_lint.py: 629 tests, OK. ruff format and check, mypy: clean.prose_lint.py --diffagainst the merge base, with and without--check sentence-length: clean.🤖 Generated with Claude Code