fix: Resolve lint errors from newer ruff releases - #199
Conversation
Ruff is unpinned in CI, and recent releases stabilised two rules that flag existing code, failing the qa job on every PR: - ISC004: parenthesise implicit string concatenations in the CITATIONS lists (auto-fix; string values are byte-for-byte unchanged) - PLR0917: add to the ignore list alongside the other PLR09xx complexity rules already ignored
📝 WalkthroughWalkthroughThe change adds Ruff rule ChangesLint configuration
Citation formatting
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (1)
pyproject.toml (1)
131-131: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winScope
PLR0917toplotter.py.Line 131 adds a project-wide ignore, but the PR objective identifies only two violations in
plotter.py. This can hide future violations in unrelated files. Use Ruff’s per-file ignore forplotter.py, or confirm that global suppression is intentional.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pyproject.toml` at line 131, Replace the project-wide PLR0917 ignore in the Ruff configuration with a per-file ignore scoped to plotter.py, preserving suppression only for that file and avoiding masking violations elsewhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pyproject.toml`:
- Line 131: Replace the project-wide PLR0917 ignore in the Ruff configuration
with a per-file ignore scoped to plotter.py, preserving suppression only for
that file and avoiding masking violations elsewhere.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 37fd4c29-a477-4314-ac19-a742818da3f2
📒 Files selected for processing (2)
pyproject.tomlsrc/elementembeddings/utils/config.py
Summary
The
qajob currently fails on every PR (e.g. #198) with 26 ruff errors. Ruff is unpinned (ruff>=0.15.21), so CI resolves the latest release each run, and recent ruff releases stabilised two rules that flag existing code:CITATIONSlists inutils/config.py. Fixed by parenthesising them (ruff auto-fix). The string values are byte-for-byte unchanged — verified by hashingCITATIONSbefore and after.plotter.py): added to the ignore list, consistent with the other PLR09xx complexity rules (PLR0911/0912/0913/0915) already ignored.Testing
ruff checkpasses on both ruff 0.16.2 (what CI resolves today) and the locked 0.15.xprek run --all-filespasses (all qa hooks)CITATIONSsha256 identical before/afterUnblocks #198.
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores