summaryrefslogtreecommitdiff
path: root/pylint
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-10-17 10:40:51 +0200
committerGitHub <noreply@github.com>2021-10-17 10:40:51 +0200
commitd3b27d8aeeb27441405d4183feb7b18a91925093 (patch)
tree56b4e256bc0f3acb8c5a8cfeae68166dfe1d1fe2 /pylint
parent97048ded8e7528e927f7f7818beb3d5d79662b03 (diff)
downloadpylint-git-d3b27d8aeeb27441405d4183feb7b18a91925093.tar.gz
Fix ``missing-function-docstring`` not checking ``__init__`` (#5147)
* Fix ``missing-function-docstring`` not checking ``__init__`` * Ignore ``object``
Diffstat (limited to 'pylint')
-rw-r--r--pylint/checkers/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py
index 5507bde74..699f2dae1 100644
--- a/pylint/checkers/base.py
+++ b/pylint/checkers/base.py
@@ -2192,6 +2192,8 @@ class DocStringChecker(_BasicChecker):
)
# check if node is from a method overridden by its ancestor
for ancestor in node.parent.frame().ancestors():
+ if ancestor.qname() == "builtins.object":
+ continue
if node.name in ancestor and isinstance(
ancestor[node.name], nodes.FunctionDef
):