-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
accept-no-raise-doc is not checked for docstrings with at least one matching section #7208
Comments
A suggested fix is to call diff --git a/pylint/extensions/docparams.py b/pylint/extensions/docparams.py
index c3253c89e..a77ac916d 100644
--- a/pylint/extensions/docparams.py
+++ b/pylint/extensions/docparams.py
@@ -313,7 +313,7 @@ class DocstringParameterChecker(BaseChecker):
else:
missing_excs.add(expected.name)
- self._add_raise_message(missing_excs, func_node)
+ self._handle_no_raise_doc(missing_excs, func_node)
def visit_return(self, node: nodes.Return) -> None:
if not utils.returns_something(node): |
Very nice bug report thank you. I credited you in the fix as you did almost everything, please feel free to review in #7212. |
I tried to fix this issue in a new PR #7581. There is still a breaking change, because one test was assuming that the default value for |
Check the accept-no-raise-doc option when the docstring has matching sections (Fixes #7208) Defaut value for accept-no-raise-doc is True, but tests in `missing_doc_required_Sphinx.py` assume that this option is set to False. Co-authored-by: Brice Chardin <brice.chardin@ensma.fr>
Bug description
The docstyle extension sometimes ignores the accept-no-raise-doc option because the
_add_raise_message
method is invoked directly instead of_handle_no_raise_doc
invisit_raise
.Configuration
Command used
Pylint output
Expected behavior
The expected behavior is to have pylint display no message.
Pylint version
OS / Environment
Debian 9.13 (stretch)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: