-
Notifications
You must be signed in to change notification settings - Fork 15
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
Bug: Requires Return Section in Docstring When None Is the Return Type #6
Comments
Hi @rbebb , Thank you for reporting this issue.
I implemented this check because this seems to be the convention of the numpy-style docstring:
I can add a configurable option that allows us to not add a "returns" section when the function returns
Yep, this is an intended behavior. By pydoclint's default, the option This allows us to be a bit "lazy" for some self-explanatory functions/methods. But as soon as we add an "args" section in our docstring, it is no longer a "short docstring", which is why pydoclint starts to check the existence of a "Returns" section. |
Hi @rbebb , I've fixed this issue in a PR. This fix will be shipped with the newest release in a day or two. |
Hi @rbebb , I just published version 0.0.5, which includes this fix. |
Thank you very much! I appreciate you making that change! |
I noticed that docstrings require a return section even when the return type is None, but this only occurs when there are parameters in the function. The error does not occur if there are zero parameters in the function. Also, the docstrings use Google style.
Example (Error):
Example (Pass):
The text was updated successfully, but these errors were encountered: