diff options
| author | Martin Pool <mbp@google.com> | 2013-01-08 18:35:22 +0100 |
|---|---|---|
| committer | Martin Pool <mbp@google.com> | 2013-01-08 18:35:22 +0100 |
| commit | d39bd9e81f9fc6930f81f5bfda8ab83879fd8bdd (patch) | |
| tree | 91083d983813ce572b4f9ec8ac18afb0da44e750 /test | |
| parent | 6441eac02dc68b847a5b0af2c7e3626cbcffaa27 (diff) | |
| download | pylint-d39bd9e81f9fc6930f81f5bfda8ab83879fd8bdd.tar.gz | |
erroneous W0212 (access to protected member) on super call. Closes #115580
Diffstat (limited to 'test')
| -rw-r--r-- | test/input/func_noerror_super_protected.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/input/func_noerror_super_protected.py b/test/input/func_noerror_super_protected.py new file mode 100644 index 0000000..5e78eea --- /dev/null +++ b/test/input/func_noerror_super_protected.py @@ -0,0 +1,22 @@ +"""Accessing a protected method through super() is ok.""" + +# pylint: disable=missing-docstring,too-few-public-methods + +__revision__ = None + +class Alpha(object): + + _secret = 2 + + def test(self): + print "test %s" % self + + +class Beta(Alpha): + + def test(self): + print super(Beta, self)._secret + super(Beta, self).test() + + +Beta().test() |
