← Back to issue list

Linters: migrate from flake8 to ruff

View original Github issue

Metadata

Project
craft-parts
Number
#337
Type
pull request
State
merged
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #337 in commit 487e049f, making Ruff the default linter while retaining flake8 through the optional make test-flake8 target.

Resolution: closed resolved

Reason: PR #337 was approved and merged as commit 487e049f, completing the flake8-to-Ruff migration and preserving flake8 as an optional developer target.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This configures ruff and sets it to the default, while still giving developers the option to run flake8 if they choose using `make test-flake8` CRAFT-1506

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #337 in commit 487e049f, making Ruff the default linter while retaining flake8 through the optional make test-flake8 target.
stealth/space-bunny-alpha — closed resolved Merged canonical/craft-parts#337 (487e049f): Ruff became the default linter, with flake8 retained as an optional make target.
qwen/qwen3.6-35b-a3b — — Merged after approval, migrating linters from flake8 to ruff. Ruff is now the default, with flake8 retained as an optional make target. 4 files changed.
qwen3.6-35b-a3b-mtp-q6 — — Migrated linters from flake8 to ruff, setting ruff as the default while keeping flake8 available via make test-flake8. The change was merged, resolving CRAFT-1506.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4012 linters: migrate to ruff snapcraft merged Merged PR #4012 (commit a6e7d5f9d, CRAFT-1505): replaced the flake8/isort/black lint setup with Ruff, config ported from craft-parts#337, plus a legacy-specific ruff.toml; dependency updates from #4011 were included.
83%
#288 lint: add ruff, remove autoflake, flake8, isort, pydocstyle, pylint craft-providers merged Merged PR #288 in commit 42a7920, replacing autoflake, flake8, isort, pydocstyle, and pylint with Ruff; deferred Ruff rule cleanup was tracked in #287.
81%
#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.
77%
#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.
75%
#932 feat: replace flake8 + plugins and isort with ruff charmcraft merged Merged PR #932 (commit ac847a31, branch ruff-in-template) replaced flake8 + plugins and isort with Ruff in charmcraft, cutting the lint dependency tree and CI instability from flake8 plugin breakage.
75%
#68 lint: update ruff and fix linting craft-archives merged Merged PR #68 as commit 8bb81ae, updating Ruff and fixing lint violations across four files after prerequisite #67.
75%
#29 style(lint): fix ruff 0.6.0 linting errors craft-platforms merged Merged PR #29 as commit 399c4e0, fixing Ruff 0.6.0 lint errors and switching the pre-commit Ruff hook to rolling versions.
74%
#907 style: adjust linting rules for ruff 0.12 rockcraft merged Merged into main as 186cb0fb, updating Ruff 0.12 settings to ignore PLC0415 and avoid unnecessary noqa comments.
74%
#4602 build(lint): use ruff from snap snapcraft merged Merged PR #4602 (8a9a5c212) replaced pyright-based CI linting with Ruff supplied by its snap for more predictable tool upgrades.
74%
#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.
73%