Skip to content

Clarify formatter choice and fix CI doctrine job#127

Open
monkeypants wants to merge 1 commit into
masterfrom
standardise-black-formatting
Open

Clarify formatter choice and fix CI doctrine job#127
monkeypants wants to merge 1 commit into
masterfrom
standardise-black-formatting

Conversation

@monkeypants
Copy link
Copy Markdown
Contributor

Summary

  • Add comment to [tool.ruff] in pyproject.toml documenting that ruff is for linting only and black handles formatting
  • Fix CI doctrine job to use uv run pytest instead of bare pytest, which fails when the system Python is <3.11 (missing tomllib)

Context

The project uses both black and ruff as dev dependencies, which creates ambiguity about which formatter is canonical. ruff format --check reports 22 files diverging from ruff's opinions even though black is happy with everything — these are genuine opinion differences between the two tools, not formatting violations.

Michael's workflow uses black (commit messages reference "black formatting"), and the Makefile already uses black --check in lint-python. This PR makes that choice explicit.

Test plan

  • ruff check passes
  • black --check passes
  • 17 doctrine tests pass
  • CI workflow syntax is valid

Fixes #126

The project uses black for formatting and ruff for linting, but this
was not documented anywhere. Add a comment to [tool.ruff] in
pyproject.toml making this explicit.

The CI doctrine job ran bare `pytest` instead of `uv run pytest`,
causing failures on systems where the system Python lacks tomllib
(pre-3.11). Use uv run for consistency with the other CI jobs.

Fixes #126
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.

Standardise on black for formatting, ruff for linting

1 participant