-
-
Notifications
You must be signed in to change notification settings - Fork 46k
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
Format docs #7821
Format docs #7821
Conversation
Perhaps what you could normalize would be all the different types of docstring params/returns, ie """
:param a: The first integer
:param b: The second integer
:return: The output
""" and """
Parameters
------------
a: :class:`int`
The first integer
b: :class:`int`
The second integer
Returns
--------
:class:`int`
The output and @params
@returns etc... |
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.
...
Since we don't build documentation for that code we could leave it as is. 80% of these params/returns could be eliminated by annotations and good variable names. |
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
These all seems fine except maybe the one word sentence. ;-) I think we should start to auto-generate docs using |
Describe your change:
Fix some warnings that would be raised by adding adding
flake8-docstrings
to the pre-commit hooks.This PR is just to show the features of that tool.
There are two groups of checks.
Documentation
This looks like a good match with the repo guidelines. For classes and functions, there is an easy trick to use the leading underscore for names, then classes/functions won't be public, so you could document only what you need.
Docstring formating
It might be a bit confusing for people since the summary does not have a lot of sense in the context of this repo. It will have the same words as in the file and function names and algorithm description is in the module docstring. Ignoring that line is not an option since there is a lot of code with doctests.
Checklist:
Fixes: #{$ISSUE_NO}
.