summaryrefslogtreecommitdiff
path: root/checkers/classes.py
diff options
context:
space:
mode:
authorMartin Pool <mbp@google.com>2013-01-08 18:35:22 +0100
committerMartin Pool <mbp@google.com>2013-01-08 18:35:22 +0100
commitd39bd9e81f9fc6930f81f5bfda8ab83879fd8bdd (patch)
tree91083d983813ce572b4f9ec8ac18afb0da44e750 /checkers/classes.py
parent6441eac02dc68b847a5b0af2c7e3626cbcffaa27 (diff)
downloadpylint-d39bd9e81f9fc6930f81f5bfda8ab83879fd8bdd.tar.gz
erroneous W0212 (access to protected member) on super call. Closes #115580
Diffstat (limited to 'checkers/classes.py')
-rw-r--r--checkers/classes.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/checkers/classes.py b/checkers/classes.py
index 1259d18..f2c2913 100644
--- a/checkers/classes.py
+++ b/checkers/classes.py
@@ -386,10 +386,15 @@ a metaclass class method.'}
self.add_message('W0212', node=node, args=attrname)
return
+ # If the expression begins with a call to super, that's ok.
+ if isinstance(node.expr, astng.CallFunc) and \
+ isinstance(node.expr.func, astng.Name) and \
+ node.expr.func.name == 'super':
+ return
+
# We are in a class, one remaining valid cases, Klass._attr inside
# Klass
if not (callee == klass.name or callee in klass.basenames):
-
self.add_message('W0212', node=node, args=attrname)
def visit_name(self, node):