tools: enable ruff
Metadata
Current evaluation
Merged. Enabled ruff, removed pylint, and resolved associated linting, type-checking, and test coverage issues. Increased overall coverage by 0.08% and resolved issue #146.
Suggested action: —
No scores available.
Issue body
This PR enables `ruff` and removes `pylint`. In the process of fixing ruff errors, `mypy` and `pyright` issues are also addressed.
The commits are split to facilitate review:
- First a commit with fixes that ruff does by itself (via `tox run -e format-ruff`);
- Next a series of commits address remaining ruff issues in individual modules;
- Then a few commits to address newly-uncovered mypy and pyright issues;
- Removal of pylint;
- Bump ruff to use the same version as Starbase;
- Fix test issues (wrong types) and coverage.
After the review is done I'll clean the commits up and keep only a handful with better messages.
Fixes #146
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Enabled ruff, removed pylint, and resolved associated linting, type-checking, and test coverage issues. Increased overall coverage by 0.08% and resolved issue #146. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main, replacing pylint with ruff and resolving associated linting and type checking errors. Test type mismatches were corrected, increasing overall coverage by 0.08%. Closes #146. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #263 tools: add ruff config | rockcraft | merged | Merged. Added ruff configuration and a test-ruff target to the Makefile. Approved by three reviewers, introducing 89 lines across three files. Linting errors were noted for correction in a separate pull request. | |
| #33 lint: fix lint issues with newer ruff | craft-archives | merged | Merged to resolve linting failures introduced by a newer ruff version. Changes fix style checks across three files. Review approved, CI passed, and coverage remained unchanged. Additional unit tests were deferred to a separate tracking ticket. | |
| #68 lint: update ruff and fix linting | craft-archives | merged | Merged into main following reviewer approval and passing CI. Updates ruff configuration and resolves linting issues across four files, maintaining 100% diff coverage with no overall coverage change. | |
| #580 style(ruff): fix linting issues from ruff update | craft-application | merged | Merged after approval by three reviewers. Resolves linting errors from a ruff update, modifying three files with a +7/-7 line change. Successfully integrated into the codebase. | |
| #803 style: fix linting issues with ruff 0.12 | craft-application | merged | Merged after approval by two reviewers. Resolves linting failures introduced by ruff 0.12 across 14 files. CI passed for fast tests, linting, and security scans, while slow test failures were tracked separately in #804. | |
| #408 style: fix linting for ruff 0.12 | starbase | merged | Merged a one-line update to resolve linting errors for ruff 0.12. Approved by two reviewers and passed all CI checks before integration. | |
| #1465 style: fix linting issues for newer ruff | craft-parts | merged | Merged after two approvals and passing all CI checks. Resolves linting compatibility issues with newer ruff versions, updating five files. | |
| #4602 build(lint): use ruff from snap | snapcraft | merged | Merged. Switched CI linting from pyright to ruff installed via snap to ensure toolchain stability. Approved by two reviewers, passed all checks, and updated five files with a +7/-3 line change. | |
| #4817 style: remove pylint | snapcraft | merged | Merged removal of pylint configuration, fully replaced by ruff. Approved by three reviewers, passed CI checks, and modified 46 files across the codebase. | |
| #901 style: fix ruff 0.13 linting issues | craft-application | merged | Merged after passing all CI checks and receiving approval from two reviewers. Resolves ruff 0.13 linting issues with a single-line change to one file. |