-
Notifications
You must be signed in to change notification settings - Fork 439
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 pydocstringformatter #4125
Add pydocstringformatter #4125
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4125 +/- ##
==========================================
- Coverage 95.56% 90.28% -5.29%
==========================================
Files 95 95
Lines 20247 20247
==========================================
- Hits 19350 18279 -1071
- Misses 897 1968 +1071 |
Not if we add changes to the pre-commit hooks here 😛 As far as the docs changes go, I'm also on the fence. On the one hand +61/-41 diff means this isn't significant at all, so we can just keep the diff. It's also slightly weird to see the first line of docstrings be broken up, because I thought that this was the basis of the blurb rendered on the page listing methods for a class. But apparently that doesn't seem to be the case: (" |
Then we must include it. Thanks.
PEP257 recommends:
Where a one-line docstring:
So, one phrase on one line. Turns out we're not aligned. We just need to provide a good "first phrase" and enforce that through CI. |
I managed to write the opposite of what I meant, so thanks for figuring it out anyway. |
In an effort to universally fix wrapping for our docstrings, I came across pydocstringformatter. It has the potential to be that solution in the future, but for the time being it's fairly limited.
I still find it quite useful at preventing simple mistakes that would normally take forever to show up in the normal documentation build. Since it does basic enforcement of numpydoc standards, let's include this.
I'm on the fence of if we should include or not include this in the blame.