summaryrefslogtreecommitdiff
path: root/pylint/test/functional/super_checks.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-05-29 15:43:10 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-05-29 15:43:10 +0300
commit734fa3d460391797b2df2781f4a14eb026b3d4e7 (patch)
tree27e1ad03276508c62f6c3df02c1b10698487f812 /pylint/test/functional/super_checks.py
parent89ec64d8bfae8c57761a5f7e6392376a0837c8d7 (diff)
downloadpylint-734fa3d460391797b2df2781f4a14eb026b3d4e7.tar.gz
Don't emit no-member on supers with unknown bases in the MRO.
Diffstat (limited to 'pylint/test/functional/super_checks.py')
-rw-r--r--pylint/test/functional/super_checks.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/pylint/test/functional/super_checks.py b/pylint/test/functional/super_checks.py
index ea20d4f..a2319fe 100644
--- a/pylint/test/functional/super_checks.py
+++ b/pylint/test/functional/super_checks.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-few-public-methods,import-error, no-absolute-import,no-member
+# pylint: disable=too-few-public-methods,import-error, no-absolute-import
"""check use of super"""
from unknown import Missing
@@ -7,7 +7,7 @@ class Aaaa: # <3.0:[old-style-class]
"""old style"""
def hop(self): # <3.0:[super-on-old-class]
"""hop"""
- super(Aaaa, self).hop()
+ super(Aaaa, self).hop() # >=3.0:[no-member]
def __init__(self): # <3.0:[super-on-old-class]
super(Aaaa, self).__init__()
@@ -16,10 +16,10 @@ class NewAaaa(object):
"""old style"""
def hop(self):
"""hop"""
- super(NewAaaa, self).hop()
+ super(NewAaaa, self).hop() # [no-member]
def __init__(self):
- super(object, self).__init__() # [bad-super-call]
+ super(Aaaa, self).__init__() # [bad-super-call]
class Py3kAaaa(NewAaaa):
"""new style"""
@@ -60,3 +60,11 @@ class SuperDifferentScope(object):
def __init__(self, arg):
super(FalsePositive, self).__init__(arg)
super(object, 1).__init__() # [bad-super-call]
+
+
+class UnknownBases(Missing):
+ """Don't emit if we don't know all the bases."""
+ def __init__(self):
+ # pylint: disable=super-on-old-class
+ super(UnknownBases, self).__init__()
+ super(UnknownBases, self).test()