Explain how to enable Markdown formatting for pre-commit hook#23077
Merged
amyreese merged 2 commits intoastral-sh:mainfrom Feb 5, 2026
Merged
Conversation
ntBre
reviewed
Feb 4, 2026
Contributor
ntBre
left a comment
There was a problem hiding this comment.
Thank you! I had one concern about the version field, but this seems great to have.
| ```yaml title=".pre-commit-config.yaml" | ||
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.0 |
Contributor
There was a problem hiding this comment.
I'm not that familiar with pre-commit, but is it possible to use something like latest here or omit the rev field? I'm just afraid that it will quickly become outdated.
We could instead add this file to the list of files updated in releases:
Line 118 in f055f39
but I'd want to remember to remove it if we add this directly to the hook after stabilization, as you said.
Contributor
Author
There was a problem hiding this comment.
Ah I misremembered and thought we automatically included all files in docs directory!
amyreese
approved these changes
Feb 4, 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.
Summary
When running Ruff through pre-commit, since
types_ordoes not includemarkdown, Markdown files are not included. I believe it could be useful to indicate what needs be done in that case.We could also set
markdowntoruff-formathook, but we probably don't want to do that until the feature is stable?Test Plan
Tested the hook locally on a project using Markdown files.
For the documentation, checked it locally:
