ci(ruff): add ruff lint+format CI gate, format whole tree#24
Merged
Conversation
- Add [tool.ruff] and [tool.ruff.lint] config to pyproject.toml (line-length=100, select E/W/F/I/B/UP, ignore E501 since format handles wrapping) - Add `lint` job (ruff check + ruff format --check) to test.yml - Run `ruff format` over all 22 files (18 reformatted, formatting churn only) - Run `ruff check --fix` (54 auto-fixed: isort, pyupgrade, bugbear, pyflakes) - Fix B905 in council.py: add strict=True to zip() over equal-length iterables - All 66 tests pass after changes
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.
Summary
[tool.ruff]config topyproject.toml(line-length=100, select E/W/F/I/B/UP)lintjob totest.ymlrunningruff check+ruff format --checkruff formatover all 22 source/test files (18 reformatted — pure whitespace/style churn, zero logic changes)ruff check --fixauto-fixing 54 issues (isort ordering, pyupgrade patterns, unused imports, bugbear)council.py:zip(members, gathered, strict=True)— semantically correct since both iterables are derived from the same listLint errors fixed vs flagged
All 55 ruff issues resolved: 54 via
--fix, 1 (B905) via manualstrict=Trueaddition. No unfixable errors remain.Test plan
ruffjob passes:ruff check .andruff format --check .both cleanpytestmatrix legs pass (66 tests each)