Skip to content

chore: enforce ruff format via pre-commit and CI - #24

Merged
eilidhmacnicol merged 3 commits into
mainfrom
chore/ruff-precommit
Jun 5, 2026
Merged

chore: enforce ruff format via pre-commit and CI#24
eilidhmacnicol merged 3 commits into
mainfrom
chore/ruff-precommit

Conversation

@eilidhmacnicol

Copy link
Copy Markdown
Contributor

What

Enforces ruff formatting, which had drifted (11 files were unformatted) and was unenforced anywhere.

  • CI: pin ruff==0.15.11 and add a ruff format --check plsdo/ tests/ step to the lint job. Previously CI ran ruff check only — the formatter was never verified, despite CONTRIBUTING.md claiming it was.
  • pre-commit: new .pre-commit-config.yaml running ruff-check --fix + ruff-format, pinned to the same v0.15.11 so the hook and CI never disagree. Added pre-commit to the dev extra and documented pre-commit install in CONTRIBUTING.md.
  • sty: commit: applies ruff format across plsdo/, tests/, and scripts/ so the new check passes.

Notes

  • The ruff version is pinned in three places (pre-commit rev, dev extra, CI) deliberately, to keep them in lockstep. Bump all three together.
  • CI's format check is scoped to plsdo/ tests/ (matching the existing ruff check scope); the pre-commit hook covers scripts/ locally.

Verification

  • ruff format --check . clean
  • ruff check plsdo/ tests/ passes
  • pytest tests/ — 208 passed

@eilidhmacnicol
eilidhmacnicol merged commit 6aba525 into main Jun 5, 2026
4 checks passed
@eilidhmacnicol
eilidhmacnicol deleted the chore/ruff-precommit branch June 5, 2026 12:19
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