ci(lint): keep Markdown out of ruff format - #154
Merged
Merged
Conversation
CI runs `uvx ruff` unpinned. ruff 0.16 started formatting Python code blocks inside Markdown by default, inserting PEP 8 blank lines into every doc snippet, so the format check now fails on 21 untouched .md files for any new PR (main last passed on 0.15.x). Doc snippets are hand-formatted on purpose: exclude "*.md" from the formatter. Verified clean with ruff 0.16.5 and 0.15.12. Claude-Session: https://claude.ai/code/session_017qxfAtbxBhFTZoaBAJKA3J
ruff 0.16 also enables RUF036 and PLR0917, which the Lint step now reports on 41 untouched sites. Adopting a new ruff belongs in its own PR, so CI runs the same ruff as the dev machines (0.15.12). Claude-Session: https://claude.ai/code/session_017qxfAtbxBhFTZoaBAJKA3J
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.
Why
CI runs
uvx ruffunpinned, so every ruff release can break CI with no code change. ruff 0.16 did, twice:Check format: it formats Python code blocks inside Markdown by default and inserts PEP 8 blank lines into every doc snippet, failing on 21 untouched.mdfiles (docs(seo): make apte discoverable (sitemap, page titles, PyPI metadata) #153 hit it)Lint: it enables RUF036 (29 sites, autofixable) and PLR0917 (12 functions, not autofixable)mainlast passed on ruff 0.15.x.What
pyproject.toml:[tool.ruff.format] exclude = ["*.md"], doc snippets stay hand-formatted regardless of ruff versionci.yml:uvx ruff@0.15.12, the version used locally. Bumping ruff and adopting the new rules is a separate PR.Verified
ruff@0.15.12 format --check .andruff@0.15.12 check .clean;ruff@0.16.5 format --check .clean with the exclude.Merge this first, then #153 gets rebased on it.
https://claude.ai/code/session_017qxfAtbxBhFTZoaBAJKA3J