diff options
author | Jacob Walls <jacobtylerwalls@gmail.com> | 2022-05-31 16:12:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 22:12:49 +0200 |
commit | bd33f79b69bef522fd8d0790d215213954a82707 (patch) | |
tree | 00bf523bdd6a9841c31d1a2e80a76d83426574af /pylint/extensions | |
parent | fa416c3f2461fb771c17ebd9414c9ff6f6ebc15b (diff) | |
download | pylint-git-bd33f79b69bef522fd8d0790d215213954a82707.tar.gz |
Fix a crash in the ``docparams`` extension when raising the result of a function (#6767)
Diffstat (limited to 'pylint/extensions')
-rw-r--r-- | pylint/extensions/_check_docs_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pylint/extensions/_check_docs_utils.py b/pylint/extensions/_check_docs_utils.py index 91b224834..dacdbe05e 100644 --- a/pylint/extensions/_check_docs_utils.py +++ b/pylint/extensions/_check_docs_utils.py @@ -135,6 +135,8 @@ def possible_exc_types(node: nodes.NodeNG) -> set[nodes.ClassDef]: exceptions = [target] elif isinstance(target, nodes.FunctionDef): for ret in target.nodes_of_class(nodes.Return): + if ret.value is None: + continue if ret.frame(future=True) != target: # return from inner function - ignore it continue |