-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enforce docparams consistently when docstring is not present #2738
Labels
Enhancement ✨
Improvement to a component
Comments
Makes sense to me too. |
@AWhetter Yep, you can use |
4 tasks
hippo91
pushed a commit
that referenced
this issue
Jan 9, 2021
* fix #2738 * doc updates * add functional tests * fix formattting * fix formatting
orSolocate
pushed a commit
to orSolocate/pylint
that referenced
this issue
Feb 1, 2021
…dev#3916) * fix pylint-dev#2738 * doc updates * add functional tests * fix formattting * fix formatting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently
pylint.extensions.docparams
producesmissing-return-doc
,missing-return-type-doc
, andmissing-yield-doc
,missing-yield-type-doc
errors for functions without a docstring. This differs frommissing-param-doc
,missing-raises-doc
, andmissing-type-doc
which are not produced for functions without a docstring.Since
pylint.extensions.docparams
does not use theno-docstring-rgx
ordocstring-min-length
options, producing these errors for missing docstrings is problematic. It provides no way to configure pylint to warn about missing return/yield documentation only when documentation is required (e.g. ignoring undocumented private methods) which seems like a valuable use case.Steps to reproduce
.pylintrc
with the following content:fixture_docparams_missing.py
with the following content:pylint fixture_docparams_missing.py
Current behavior
Expected behavior
No errors (due to
missing-docstring
suppressed by defaultno-docstring-rgx
).Alternatively, all
missing-*
error types produced bypylint.extensions.docparams
and a configuration option to suppress the errors in a similar way tono-docstring-rgx
.pylint --version output
From a local clone of 51e12f8:
Thanks for considering,
Kevin
The text was updated successfully, but these errors were encountered: