Repository navigation
build(ruff): select RUF100 and drop four stale noqa comments - #730
Conversation
PGH004 (blanket noqa) is already selected through PGH and reports no site. RUF100 now flags a noqa that silences nothing. The four noqa: F401 comments it found are removed; the re-export notes stay as plain comments. Codes of rules not selected here go in lint.external so their noqa comments stay. Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change enabling unused-noqa checks and removing stale suppressions.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
This PR strengthens dokimi’s lint checks by enabling Ruff’s unused-noqa rule, following up on #729 without changing runtime behavior.
Changes:
- Enable
RUF100and preserve suppressions for unselected rules throughlint.external. - Remove four stale
F401suppressions while retaining existing re-export notes. - Remove the obsolete deferral comment and add a changelog fragment.
| File | Description |
|---|---|
dokimi/pyproject.toml |
Enable RUF100, configure external codes, and remove its deferral note. |
dokimi/dokimi/mcp/mcp_protocol.py |
Remove the stale suppression from the MCP SDK import. |
dokimi/dokimi/harnesses/docker_solver.py |
Remove the stale suppression; retain the re-export note. |
dokimi/dokimi/harnesses/container_agent.py |
Remove the stale suppression from the timeout import. |
dokimi/dokimi/eval/arm_runner.py |
Remove the stale suppression; retain the re-export note. |
dokimi/changelog.d/20261113_120000_napetrov_ruf100-unused-noqa.md |
Document the lint rule and suppression cleanup. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 6 selected item(s). CI at Review details
|
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #730 +/- ##
=======================================
Coverage 95.72% 95.72%
=======================================
Files 405 405
Lines 54211 54211
Branches 9325 9325
=======================================
Hits 51895 51895
Misses 1430 1430
Partials 886 886
🚀 New features to boost your workflow:
|
xaleryb
left a comment
There was a problem hiding this comment.
Re-checked on the head merged with main: ruff, mypy, bandit and the strict docs gate pass; RUF100 flags a stale noqa, passes a noqa for an external code, and flags one for an unselected rule; the four touched modules have the same AST as main. Static checks is green after the update with main; the PR's own diff is unchanged.
Follow-up to #729: the task asked for PGH004 (blanket
# noqa). It is already selected through"PGH"in[tool.ruff.lint], andruff check --select PGH004reports no site at main (a probe file with a codeless# noqadoes get flagged, so the rule is live). So this PR adds the cheap neighbour instead:# noqa: F401comments, where the import is now used in the module (arm_runner.py,container_agent.py,docker_solver.py,mcp_protocol.py). They are removed; the "re-exported" notes stay as plain comments.lint.externallists the noqa codes of rules dokimi does not select (ARG001, BLE001, E402, E731, N802, N818, S310), so RUF100 leaves those 34 comments alone. BLE001 can come off the list once Enable ruff BLE001/S110/S112: no silent except #729 selects it.Checks:
ruff check .passes;scripts/check_comment_blocks.pypasses. Tests for the touched modules: 297 passed; 8test_container_agent.pyfailures also fail on origin/main on this Windows box (path separators, Docker), so they are not from this change. Local self-review (L1, one pass): no blockers.🤖 Generated with Claude Code