Skip to content
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

Using ruff to format doctests in .rst (and other format) files #9620

Closed
jagerber48 opened this issue Jan 23, 2024 · 2 comments
Closed

Using ruff to format doctests in .rst (and other format) files #9620

jagerber48 opened this issue Jan 23, 2024 · 2 comments

Comments

@jagerber48
Copy link

#7146 introduces the ability to format code examples within docstrings in .py files. In this message outlining the proposed strategy it was specifically deemed out of scope to apply formatting to .rst or .md files

Formatting Python code in other formats
This means you won't be able to run the formatter over a .rst or a .md file
and have it format any Python code blocks in it. This initial implementation
will only support reformatting Python snippets within docstrings inside Python
files. We can consider formatting Python code in other formats as a future
project.

I'm opening up this issue to request such an ability be added to ruff it that is not already being considered. Or, if it has been considered, then to discuss the issue or hear why it wouldn't be possible.

@zanieb
Copy link
Member

zanieb commented Jan 23, 2024

Hi! This looks like a duplicate of #8237 — let us know if that doesn't cover your use case. In short, we want to do it we just haven't started yet :)

@zanieb zanieb closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2024
@jagerber48
Copy link
Author

@zanieb yes, duplicate. I tried looking but didn't find it. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants