Skip to content

ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#52

Open
korbonits wants to merge 1 commit intoapple:mainfrom
korbonits:ci/ruff-precommit-and-actions
Open

ci: add Ruff config, pre-commit hooks, and GitHub Actions lint workflow#52
korbonits wants to merge 1 commit intoapple:mainfrom
korbonits:ci/ruff-precommit-and-actions

Conversation

@korbonits
Copy link
Copy Markdown

Summary

  • Add pyproject.toml with Ruff config (E/F/I rules, 120-char line length, per-file ignores for __init__.py)
  • Add .pre-commit-config.yaml with Ruff lint + format hooks
  • Add .github/workflows/lint.yml triggering on PRs and pushes to main
  • Auto-fix 106 violations (unsorted imports, unused imports, f-string placeholders)

Notes

F821/F601 are in the ignore list — they flag dead code after an unreachable return statement in two_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 . and ruff format --check . locally — all checks pass.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant