-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Standardize docstrings with ruff pydocstyle rules #3881
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
Standardize docstrings with ruff pydocstyle rules #3881
Conversation
Viicos
left a comment
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.
I like it, I generally prefer having single line docstrings not on 3 lines, so looks good!
|
Does this need any change in the Ruff pyproject config? |
If you're talking about https://docs.astral.sh/ruff/rules/fits-on-one-line/ then no, it's included with pydocstyle and not ignored. |
|
This will probably need to be reviewed again once I push a commit fixing the docs build, marking as a draft for now. I was also hoping this PR would fix the |
I was talking about the ruff pyproject configuration we have, but it seems it was added in your last commit 👍
Do you have an example of such a |
After running Interestingly, the build log for the docs CI doesn't show it, so it might be some sort of weird setup on my part. |
|
Does this automagically work with the CI ? because we should probably make sure it's done automagically here too |
A lot of the formatting ones do (see the ones marked with tools here https://docs.astral.sh/ruff/rules/#pydocstyle-d) Sometimes, with regards to |
|
This PR can now also remove |
|
If there are no other thoughts on this, I might merge it within the next few days. |
Is this still an issue now? Python 3.12 started warning about invalid escape sequences but iirc it is planned to error in some later versions. You can use the |
Ah right I'd forgotten about that change in python 3.12, now it makes sense why it wasn't in the ci log (which runs 3.11). I think I figured out why the |
Replace
flake8-docstringswithpydocstyle. This should allow for fixing/standardization of doc strings automatically by ruff (viapre-commit).If you disagree with any of the changes, feel free to comment!
Note
We might want to add this to git blame ignore sha list
Documentation
https://manimce--3881.org.readthedocs.build/en/3881/