← Back to issue list

tools: enable ruff

View original Github issue

Metadata

Project
craft-cli
Number
#173
Type
pull request
State
merged
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #173 enabled Ruff, removed pylint, and fixed related mypy, pyright, test, and coverage issues; it explicitly fixes canonical/craft-cli#146.

Resolution: closed resolved

Reason: PR #173 was approved and merged into main. Its merged changes completed the Ruff migration and resolved canonical/craft-cli#146.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged PR #173 enabled Ruff, removed pylint, and fixed related mypy, pyright, test, and coverage issues; it explicitly fixes canonical/craft-cli#146.
stealth/space-bunny-alpha — closed resolved Merged PR #173 enabled Ruff, removed pylint, fixed surfaced type/test issues, and resolved #146.
stealth/space-bunny-alpha — closed resolved Merged PR #173 enabled Ruff, removed pylint, and fixed resulting mypy, pyright, test, and coverage issues; it resolves #146.
stealth/space-bunny-alpha — closed resolved Merged #173 enabled Ruff, replaced pylint, and fixed related mypy, pyright, test, and coverage issues; it explicitly fixes #146.
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.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-cli#146 (confidence 100%)

    PR #173 explicitly states that it fixes the Ruff migration issue.

Related issues

Issue Project State Summary Similarity
#146 style: fix linting errors for ruff 0.12 craft-platforms merged PR #146 merged in craft-platforms (commit fdad4a1) to fix ruff 0.12 lint errors: added # noqa: PLC0415 to lazy import in tests/conftest.py and ignored PLW1641 (eq-without-hash) in pyproject.toml.
75%
#562 Remove pylint in favour of ruff craft-parts closed Pylint was dropped in favour of ruff by merged PR #580 (commit 111c8907, "chore(linter): enable ruff base on starbase config"), removing the [tool.pylint] config and CI/Makefile/dependency usage; ruff config expanded to cover it.
75%
#33 lint: fix lint issues with newer ruff craft-archives merged PR #33 merged as commit c2a6687, fixing new lint failures introduced by a newer Ruff release across3 files (+5/-3). Maintainer deferred extra unit tests to CRAFT-1641.
74%
#675 style(lint): replace pylint with ruff rockcraft merged Merged as b7d70598, replacing pylint with Ruff, adding Ruff to CI and project requirements, and enabling equivalent lint coverage.
74%
#118 style: remove pylint craft-store merged Merged PR #118 as commit beb9201, removing Pylint configuration and tooling after Ruff had replaced it.
73%
#901 style: fix ruff 0.13 linting issues craft-application merged Merged in canonical/craft-application#901 via commit 0a659742, fixing Ruff 0.13 linting with a one-line change; review was approved and all CI checks passed.
73%
#995 fix: resolve ruff and mypy lint errors craft-providers merged Merged PR canonical/craft-providers#995 (commit 8112dd7) fixing ruff ISC004/PLR0917 and mypy errors in snap_installer, multipass and ubuntu bases; lint and test CI checks pass.
71%
#415 style: fix ruff 0.16 warning craft-store merged Merged PR #415 as commit b24d684, adding a directive to ignore Ruff 0.16's new warning; all CI checks passed.
71%
#1465 style: fix linting issues for newer ruff craft-parts merged Merged #1465 as a58695ef, fixing five files (+13/-6) for compatibility with newer Ruff; all CI checks passed.
71%
#580 style(ruff): fix linting issues from ruff update craft-application merged Merged PR canonical/craft-application#580 (commit 97347705) by lengau applied style-only fixes (+7/-7, 3 files) for new lint failures caused by a Ruff update; approved by 3 reviewers.
71%