chore: adopt ruff as the linter, replace flake8#1
Closed
shmulc8 wants to merge 1 commit into
Closed
Conversation
- Replace flake8 with ruff (pinned 0.15.20) in the dev group and enable the ruff pre-commit hook; drop the now-redundant isort hook (ruff sorts imports). The existing pre-commit CI workflow now actually enforces linting, which the configured-but-unused ruff never did. - Apply ruff's safe autofixes: remove unused imports (F401), collapse f-strings without placeholders (F541), sort imports (I001) — 302 fixes across 72 files, tests still green. - Defer pre-existing violations (E501, bare-except, bugbear rules, etc.) via an explicit ignore list with a TODO to burn it down, so ruff runs green on adoption without a mass-churn reformat. Scope F821 to the similar-issue tool's lazy optional imports. - Update AGENTS.md to run `ruff check` instead of flake8. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADg72cCmirPo9W3E74Htyk
Owner
Author
|
Superseded by The-PR-Agent#2511, opened natively in the upstream repo now that access is sorted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on the uv migration (The-PR-Agent#2509). Base is
feature/uv-migrationso this diff shows only the ruff changes; retarget to upstreammainonce The-PR-Agent#2509 merges.What
Consolidates linting on ruff and, crucially, makes it enforced — ruff was already configured in
pyproject.tomlbut never run in CI.flake8withruff(pinned0.15.20) in the dev group; enable the ruff pre-commit hook and drop the now-redundant isort hook (ruff sorts imports). The existingpre-commit.ymlworkflow now enforces linting on every PR.GiteaProviderimport.lint.ignorelist with a TODO to burn it down, so ruff runs green on adoption without a mass-churn reformat. F821 is scoped topr_similar_issue.py(its optional deps are imported lazily).AGENTS.mdto runruff checkinstead of flake8.Deliberately NOT included
ruff format(repo-wide formatting) — that's a large diff best done as its own PR plus a.git-blame-ignore-revsentry.Verification
ruff check→ All checks passed; ruff pre-commit hook passes.PYTHONPATH=. uv run pytest tests/unittest→ 1245 passed (autofixes broke nothing).Follow-up debt (flagged, not fixed here)
F811— two real redefinitions worth a look: a shadowedhandle_github_webhooksinbitbucket_app.py:311and a re-importedRequestinazuredevops_server_webhook.py:18.lint.ignorelist is the debt ledger — each entry is a rule to clean up and re-enable.🤖 Generated with Claude Code