summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-07 14:54:21 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-15 21:14:28 +0100
commit7437dc8bbbfa1e966a03bc688052aa0bfb815d95 (patch)
tree294002566ab77be838b318eb440f60a5dc2be79d
parenta01df6cb44d76a984704099674eb608a3473ffc2 (diff)
downloadpylint-git-7437dc8bbbfa1e966a03bc688052aa0bfb815d95.tar.gz
Fix W504 line break after binary operator
-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