-
Notifications
You must be signed in to change notification settings - Fork 276
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
Apply pre-commit
on docstrings - fix invalid Python in docs
#3220
Conversation
9b8d2b8
to
270b19f
Compare
I think https://github.com/cphyc/pre-commit-all-the-way-down/ is too slow at the moment to be used in prod. There are many ways it can improve in the future (and I intend to do it), but in the meantime I think this PR can go as is! |
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.
Thanks a lot for doing this ! Beyond the consistency and arguable "prettiness" improvements here, the mere fact that you were able to run black there means that you validated the doctests as valid Python. It doesn't mean they pass, but that's certainly an excellent first step to perform before we can make them part of CI via pytest.
Classifying this as Infra (CI) by anticipation. |
pre-commit
on docstringspre-commit
on docstrings - fix invalid Python in docs
f0bead7
to
6f0396c
Compare
This is obtained by using pre-commit-all-the-way-down (https://github.com/cphyc/pre-commit-all-the-way-down) on the codebase, applying only isort, pyupgrade and black
6f0396c
to
bedba16
Compare
I have tagged it as "bug" because it fixes several invalid code snippets in our docstrings (see e.g. https://github.com/yt-project/yt/pull/3220/files#diff-459eb66cb29de05519a40f30db1bf3653d4c13c115829dd48cc4409fc3149e0bR2344, where the final |
LGTM. Got some conflicts, but I think it should go in once those are resolved. |
Attempts to use https://github.com/cphyc/pre-commit-all-the-way-down/ on our docstrings.