-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code snippet formatting in docstrings via Ruff #36262
Conversation
This might also remove the need for
Am I reading that correctly? |
You can check it by wrong-formating some of those :) |
This was made available [as part of v0.1.8 of the Ruff Formatter](https://astral.sh/blog/ruff-v0.1.8#formatting-code-snippets-in-docstrings). Adding this config option to the `ruff-format` pre-commit hook.
46eeff2
to
5992279
Compare
Nope just handles those directives in docstrings not in rST files. Maybe one day. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great one! I was planning to test it once I have some time.
This was made available [as part of v0.1.8 of the Ruff Formatter](https://astral.sh/blog/ruff-v0.1.8#formatting-code-snippets-in-docstrings). Adding this config option to the `ruff-format` pre-commit hook. (cherry picked from commit e9ba37b)
This was made available as part of v0.1.8 of the Ruff Formatter. Adding this config option to the
ruff-format
pre-commit hook.