← Back to issue list

Replace flake8 and pydocstyle template tests with ruff

View original Github issue

Metadata

Project
charmcraft
Number
#1461
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Ruff replaced flake8 and pydocstyle in Charmcraft template validation via merged PR #1941 (commit 9aba24c4).

Resolution: closed resolved

Reason: PR #1941 was merged as commit 9aba24c4, replacing flake8 and pydocstyle template tests with Ruff and directly resolving the tool-divergence concern.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done We currently have tests that run each profile for `charmcraft init` and then run them through pydocstyle etc. Replace these with tests that run `ruff` on them the way the linter says to do so. ### Why it needs to get done We moved everything to ruff but forgot these tests. It could become an issue if the tools diverge.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Ruff replaced flake8 and pydocstyle in Charmcraft template validation via merged PR #1941 (commit 9aba24c4).
stealth/space-bunny-alpha — closed resolved Replaced template flake8/pydocstyle checks with Ruff in merged PR #1941 (commit 9aba24c4), completing the migration requested in #1461.
stealth/space-bunny-alpha — closed resolved Merged PR #1941 in commit 9aba24c4, replacing template flake8 and pydocstyle checks with Ruff and resolving #1461.
stealth/space-bunny-alpha — closed resolved Merged PR #1941 in commit 9aba24c4, replacing flake8 and pydocstyle in Charmcraft templates with Ruff and resolving #1461.
qwen3.6-35b-a3b-mtp-q6 — — Closed without a linked pull request or comments, indicating the task was abandoned or resolved separately.
qwen/qwen3.6-35b-a3b — — Closed without comments or linked resolution. The task to update template tests from flake8 and pydocstyle to ruff remains unaddressed and appears abandoned.
qwen/qwen3.6-35b-a3b — — Requested replacement of flake8 and pydocstyle template tests with ruff was closed as resolved. The maintainer implemented the updated tests to align with the project's linter migration, ensuring consistent linting.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned and closed without resolution or linked pull request. The task to replace flake8 and pydocstyle template tests with ruff remains unaddressed.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1941 (confidence 100%)

    Merged PR #1941 implemented the Ruff migration in commit 9aba24c4.

Related issues

Issue Project State Summary Similarity
#1941 fix(templates): replace flake8 and pydocstyle with ruff charmcraft merged Merged PR #1941 (commit 9aba24c4) replaced flake8 and pydocstyle with Ruff in Charmcraft templates, resolving #1461.
92%
#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.
80%
#2383 style: update to ruff 0.12 charmcraft merged Merged PR #2383 updated Charmcraft to Ruff 0.12 and applied the associated lint and formatting changes across nine files.
76%
#1329 test(style): remove pydocstyle tests on charmcraft code charmcraft merged Merged in commit e7c55c88: removed redundant pydocstyle tests covered by Ruff and relocated init-command test helpers.
76%
#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.
74%
#739 chore: remove flake8 and pydocstyle rockcraft merged Merged #739, removing flake8 and pydocstyle after replacing them with Ruff; commit 6939aba5.
72%
#2819 fix(tests): resolve ruff lint failures in test suite charmcraft merged Merged charmcraft#2819, fixing four Ruff CI failures by making excess pytest arguments keyword-only and parenthesizing implicit string concatenations in tests.
72%
#337 Linters: migrate from flake8 to ruff craft-parts merged Merged PR #337 in commit 487e049f, making Ruff the default linter while retaining flake8 through the optional make test-flake8 target.
72%
#1517 build: update ruff settings charmcraft merged Merged into charmcraft as commit 33854f04, updating the project's Ruff lint configuration (+6/-6).
71%
#1378 build: replace `black` with `ruff format` in charmcraft templates charmcraft merged PR #1378 merged as commit 485a756c, swapping black for ruff format/check in the scaffolded charm templates (tox.ini/pyproject) and bumping the default ops version to 2.8.
71%