Skip to content

chore: use ruff for formatting Python snippets in docs - #12245

Merged
anakin87 merged 2 commits into
mainfrom
use-ruff-for-python-snippets-in-docs
Aug 5, 2026
Merged

chore: use ruff for formatting Python snippets in docs#12245
anakin87 merged 2 commits into
mainfrom
use-ruff-for-python-snippets-in-docs

Conversation

@anakin87

@anakin87 anakin87 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Related Issues

Ruff 0.16.0 supports markdown code formatting so I thought: let's try to adopt it instead of maintaining a custom pre-commit hook

Proposed Changes:

  • use ruff for formatting Python snippets in docs
  • make sure that the hook matches the output of manually running hatch run fmt in the repo
  • adapt existing docs

How did you test it?

CI

Notes for the reviewer

Code changes are very minimal but buried between docs updates. Just inspect this commit: a6616dd

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview Aug 5, 2026 9:51am

Request Review

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@anakin87 anakin87 added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Aug 5, 2026
@anakin87 anakin87 self-assigned this Aug 5, 2026
@anakin87
anakin87 requested a review from kacperlukawski August 5, 2026 09:55
@anakin87
anakin87 marked this pull request as ready for review August 5, 2026 09:55
@anakin87
anakin87 requested a review from a team as a code owner August 5, 2026 09:55
@anakin87
anakin87 requested review from davidsbatista and removed request for a team August 5, 2026 09:55

@kacperlukawski kacperlukawski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! I'll try to use it in some other repositories as well!

@anakin87
anakin87 merged commit 8eb05c2 into main Aug 5, 2026
35 of 36 checks passed
@anakin87
anakin87 deleted the use-ruff-for-python-snippets-in-docs branch August 5, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:build/distribution topic:DX Developer Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants