chore: exclude Markdown from ruff format scope - #2589
Merged
Conversation
Contributor
WalkthroughRuff configurations in four Python projects now exclude Markdown files and document Ruff’s Markdown formatting behavior. ChangesRuff Markdown exclusion
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
goldmedal
approved these changes
Jul 28, 2026
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.
Root cause
ruff 0.16.0 (2026-07-23) ships a breaking change:
Our lint jobs declare
ruff>=0.4with no upper bound, so CI adopted 0.16.0 onits own and
.mdfiles enteredruff format's scope for the first time.wren-langchain CIhas been red onmainsince 2026-07-24.Bisect in
sdk/wren-langchain— the file count alone shows it:.pycount).py+ 2.md)All 38
.pyfiles are clean under 0.16.0. The failure comes entirely fromMarkdown.
Why exclude rather than reformat
it cannot parse — a
.mdholding syntactically invalid Python still reports1 file already formattedand exits 0. The check is cosmetic only.docs/core/sdk/langchain.mdanddocs/core/sdk/pydantic.mdshare snippets with the SDK READMEs but sit underno ruff config, so the same example is enforced in one file and unmanaged in
the other.
release can turn CI red on documentation again.
comments across a column of API-to-description pairs. ruff has declined to
preserve alignment (Formatter: Keep right-hanging comments aligned astral-sh/ruff#7684, open since 2023; formatter: add config option to preserve leading whitespace before inline comments astral-sh/ruff#23578
closed unmerged) — a fair call for code, a poor fit for a hand-tuned doc table.
extend-exclude = ["*.md"]is the opt-out Astral documents for this.What
Added to every package carrying a ruff config:
sdk/wren-langchain— fixes the red CIsdk/wren-pydantic— latent; its CI has not run since before the releasecore/wren— passing, but its lint runsuvx ruff(always newest)core/wren-core-py— no-op while pinned at 0.13.1No documentation content is changed.
Test plan
Each package's own CI commands under ruff 0.16.0, plus 0.15.0 to confirm the
setting is inert on older versions — all pass:
wren-langchain38 files,wren-pydantic34,core/wren69 (src/),wren-core-py3.Pre-existing and untouched:
core/wren-core-pyhas anI001intests/test_cube.pyonmain, identical with and without this change.Separately: pinning ruff would not help
core/wren— its lint callsuvx ruff,which resolves independently of the project's dev dependencies. Happy to open an
issue if worth pursuing.
Summary by CodeRabbit