Closed
Description
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
in visit_raise
.
"""Minimal example where a W9006 message is displayed even if the
accept-no-raise-doc option is set to True.
Requires at least one matching section (`Docstring.matching_sections`)."""
def w9006issue(dummy: int):
"""Sample function.
:param dummy: Unused
"""
raise AssertionError()
Configuration
[MAIN]
load-plugins=pylint.extensions.docparams
[pylint.extensions.docstyle]
accept-no-raise-doc=yes
Command used
pylint w9006_issue.py
Pylint output
************* Module w9006_issue
w9006_issue.py:6:0: W9006: "AssertionError" not documented as being raised (missing-raises-doc)
------------------------------------------------------------------
Your code has been rated at 5.00/10 (previous run: 5.00/10, +0.00)
Expected behavior
The expected behavior is to have pylint display no message.
Pylint version
pylint 2.14.5
astroid 2.11.7
Python 3.8.5 (default, Sep 7 2020, 16:44:59)
OS / Environment
Debian 9.13 (stretch)
Additional dependencies
No response