Repository navigation
Commit 90ce00f
Keep the ruff formatter out of Markdown
ruff 0.16 began formatting Python code blocks inside .md files. That makes
`uv run ruff format --check` want to rewrite README's samples, so
`just format-check` fails on README.md with "1 file would be reformatted,
38 files already formatted" while every actual .py file is clean.
This has to be settled before CI runs format-check, which the next PR adds.
The reformat is not an improvement. README aligns trailing comments so a block
of schedule examples reads as a column, and ruff flattens each to a single
space. Several samples are deliberately partial. Documentation prose and its
snippets are a human's call, not the formatter's, and PR 12 owns the README
anyway -- one of the hunks ruff wants is the `scheduler.update_task` sample
that PR 3 deletes outright, so formatting it now is churn with a short life.
Excluding Markdown is also stable, where reformatting is not: it holds across
future ruff releases instead of re-churning README whenever the embedded-code
formatter changes.
Scoped to [tool.ruff.format] rather than a global exclude, so linting is
unaffected. (This repo only ever runs `ruff format`; `ruff check` is not wired
into any recipe.)
Why this was invisible until now: uv.lock is git-ignored and pyproject only
floors ruff at >=0.15.0. A fresh resolve -- CI, or any new checkout -- gets
0.16.x, while an older cached environment stays on 0.15.x, which never looked
at .md at all. I had 0.15.8 locally and reported format-check green; three
worktrees with fresh venvs all resolved 0.16.8 and disagreed. Verified this fix
against 0.16.8, not the stale environment.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 7667e0e commit 90ce00f
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments