ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#52
Open
korbonits wants to merge 1 commit intoapple:mainfrom
Open
ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#52korbonits wants to merge 1 commit intoapple:mainfrom
korbonits wants to merge 1 commit intoapple:mainfrom
Conversation
- Add pyproject.toml with Ruff config (E/F/I rules, 120-char line length) - Add .pre-commit-config.yaml with ruff lint + format hooks - Add .github/workflows/lint.yml triggering on PRs - Auto-fix 106 violations (unsorted imports, unused imports, f-strings) Note: F821/F601 ignored — these flag dead code after an unreachable return statement in two_state_utils/plot.py, not live bugs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
pyproject.tomlwith Ruff config (E/F/I rules, 120-char line length, per-file ignores for__init__.py).pre-commit-config.yamlwith Ruff lint + format hooks.github/workflows/lint.ymltriggering on PRs and pushes tomainNotes
F821/F601are in the ignore list — they flag dead code after an unreachablereturnstatement intwo_state_utils/plot.py, not live bugs. Worth cleaning up separately.Motivation
No linting or PR-level CI exists today. This PR adds lightweight enforcement using Ruff — fast, single dependency — and wires it up to run on every PR.
Testing
Ran
ruff check .andruff format --check .locally — all checks pass.Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com