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.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py
index 6915b364b..06fe30ca7 100644
--- a/pylint/checkers/classes.py
+++ b/pylint/checkers/classes.py
@@ -1431,12 +1431,10 @@ a metaclass class method.",
name = stmt.targets[0].name
if _is_attribute_property(name, klass):
return
-
+ licit_protected_member = not attrname.startswith("__")
if (
not self.config.check_protected_access_in_special_methods
- and
- # A licit use of protected member is inside a special method
- not attrname.startswith("__")
+ and licit_protected_member
and self._is_called_inside_special_method(node)
):
return