← 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 after approval, migrating linters from flake8 to ruff. Ruff is now the default, with flake8 retained as an optional make target. 4 files changed.

Suggested action:

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
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 Migrated linters to Ruff with a legacy-specific ruff.toml. Approved by two reviewers, passed CI with 100% diff coverage, and merged into main with 167 additions and 35 deletions across 20 files.
84%
#932 feat: replace flake8 + plugins and isort with ruff charmcraft merged Merged after approval and passing CI checks, replacing flake8, plugins, and isort with ruff to resolve CI instability from dependency conflicts. Updated six files to streamline Python linting.
78%
#1825 style(lint): fix ruff 0.6.0 linting errors charmcraft merged Merged following two reviewer approvals and passing CI. The change resolves ruff 0.6.0 linting errors across 31 files using ruff's autofix, resulting in 70 additions and 71 deletions.
78%
#4712 Move more linting to ruff snapcraft closed Completed. Linting configuration was updated to align with starbase, replacing isort with ruff and disabling redundant flake8 and pylint tests. Maintainer confirmed the changes and closed the issue.
77%
#55 lint: stricter ruff rules starbase merged Merged stricter ruff linting rules. The change modifies one file with 23 additions and 9 deletions, enforces stricter configuration, and received reviewer approval before integration.
77%
#675 style(lint): replace pylint with ruff rockcraft merged Merged a pull request replacing pylint with ruff for linting. The author updated CI configuration and requirements files to include ruff and remove pylint, ensuring all linters were properly enabled. Approved by reviewers and passed CI checks.
76%
#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.
76%
#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.
76%
#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.
76%
#165 style: fix linting for ruff 0.12 imagecraft merged Merged a pre-emptive linting update for ruff 0.12 compatibility. Approved by two reviewers and passed CI. The change adjusts formatting across four files to prevent breaking changes when the snap reaches stable.
76%