summaryrefslogtreecommitdiff
path: root/pylint/checkers/classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/classes.py')
-rw-r--r--pylint/checkers/classes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py
index d75107136..604b8ef45 100644
--- a/pylint/checkers/classes.py
+++ b/pylint/checkers/classes.py
@@ -823,6 +823,9 @@ a metaclass class method.",
# check if any method attr is defined in is a defining method
if any(node.frame().name in defining_methods for node in nodes):
continue
+ # Exclude `__dict__` as it is already defined.
+ if attr == "__dict__":
+ continue
# check attribute is defined in a parent's __init__
for parent in cnode.instance_attr_ancestors(attr):