fix(ci): keep ruff off Markdown so a minor bump stops breaking lint#9899
Merged
Conversation
ruff is pinned as >=0.15.21 with no upper bound; CI resolved 0.16.0, which formats Python code blocks inside Markdown. Twenty tracked .md files went unformatted overnight and every PR's Lint job turned red. Excluding *.md is the fix rather than reformatting those files: nine of them are prompts/library/*.md, whose code snippets steer generation, so a quote-style rewrite there changes pipeline behaviour under the guise of formatting.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes CI linting by preventing Ruff from formatting Python code blocks inside Markdown files after the Ruff 0.16.0 behavior change, avoiding unrelated docs/prompts churn that can break lint on otherwise unaffected PRs.
Changes:
- Add
*.mdto Ruff’s globalexcludelist inpyproject.tomlto keep Ruff focused on Python sources. - Add a
[Unreleased]changelog entry describing the CI breakage and the chosen mitigation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Excludes Markdown from Ruff to prevent format-check failures caused by Markdown code-block formatting behavior. |
| CHANGELOG.md | Documents the CI regression and the configuration change under [Unreleased]. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
pyproject.tomlpinsruff>=0.15.21with no upper bound. CI resolved 0.16.0 today, and that version formats Python code blocks inside Markdown — 20 tracked.mdfiles immediately counted as unformatted andRun Lintingwent red on every PR (first seen on feat(seo): serve prerendered pages to AI crawlers, state the crawler policy in robots.txt #9898, which touches none of those files).*.mdjoins ruff's exclude list. Ruff owns this repo's Python, not its prose.prompts/library/*.md, whose snippets steer code generation, so a quote-style rewrite there is a pipeline change wearing a formatting costume. If the docs should be ruff-formatted, that is its own decision with its own review.Plan
N/A — unblocks CI.
Test plan
uvx ruff@0.16.0 format --check .→148 files already formatted(was:20 files would be reformatted)uvx ruff@0.16.0 check .→All checks passed!ruff@0.15.21(the version CI resolved while green) → identical results, so the change is not version-specificRun Lintinggreen on this PR