fix: make the known-benign message concatenation explicit (ISC004) - #3
Conversation
The message was assembled by implicit string concatenation inside the returned tuple. The produced value was correct, but this is precisely the construct where one missing comma merges two tuple elements into a single string silently, rather than failing — so the reader cannot tell a deliberate two-line string from a typo. Wrapped in explicit parentheses, and ISC added to the ruff select list so the pattern stays caught instead of being fixed once and regressing.
|
Warning Review limit reached
Next review available in: 23 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
Greptile SummaryThe PR preserves
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The code change preserves the same tuple and string value, the lint configuration targets the intended pattern, and no concrete newly introduced lint or repository-rule violation was established.
|
| Filename | Overview |
|---|---|
| fileanalyzer/verdict.py | Makes an existing string concatenation explicit without changing the returned tuple or message. |
| pyproject.toml | Adds the ISC lint family and documents why it is intentionally enabled. |
| CHANGELOG.md | Accurately records the behavior-preserving cleanup and lint configuration change. |
Reviews (1): Last reviewed commit: "fix: make the known-benign message conca..." | Re-trigger Greptile
PR #4 (canonical SPDX license expression) landed while this branch was open. pyproject.toml auto-merged cleanly -- their license/build-requires change and this branch's ruff ISC selection touch different keys. CHANGELOG.md conflicted because #4 opened a released [0.2.1] section where this branch had added [Unreleased] entries. Resolved by keeping both in their proper places: the ISC004 fix stays unreleased, [0.2.1] follows as the shipped section.
There was a problem hiding this comment.
t0kubetsu has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
What
Wraps an implicitly concatenated string in explicit parentheses, and adds
ISCto the ruffselectlist.Why
determine_verdict()built its known-benign message from two adjacent string literals inside the returned tuple:The value produced is correct. The problem is that this is the exact construct where a single missing comma silently merges two tuple elements into one string rather than raising — and a reader cannot distinguish a deliberate two-line string from that typo. Surfaced by
ISC004when the new CI ran against current ruff.The rule, not just the instance
The CI configuration merged last week pins
select = ["E4", "E7", "E9", "F"], which does not includeISC— so fixing only the call site would leave the pattern free to reappear with nothing to catch it.ISCis now selected, with a comment recording why it is beyond the default set.Verified
ruff check fileanalyzer/ tests/clean, 88 tests passing. No behaviour change — same tuple, same string value.