summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-08-16 16:06:16 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-08-16 16:06:16 +0200
commit242c4c9981a39f68fb571ea6467c993d7f087b4d (patch)
treeb885821667cbb365db4aacf2544146b2e4cb6f8a
parente837bb112591dced80eb7ddbae532aec9fcd19bb (diff)
downloadpylint-git-242c4c9981a39f68fb571ea6467c993d7f087b4d.tar.gz
Remove occurrences of removed checks
-rw-r--r--pylint/checkers/spelling.py2
-rw-r--r--pylint/test/functional/access_to__name__.py2
-rw-r--r--pylint/test/functional/access_to__name__.txt1
-rw-r--r--pylint/test/functional/init_not_called.py6
-rw-r--r--pylint/test/functional/init_not_called.txt3
-rw-r--r--pylint/test/functional/invalid_exceptions_raised.py2
-rw-r--r--pylint/test/functional/namePresetCamelCase.py2
-rw-r--r--pylint/test/functional/name_preset_snake_case.py2
-rw-r--r--pylint/test/functional/newstyle_properties.py53
-rw-r--r--pylint/test/functional/newstyle_properties.txt2
-rw-r--r--pylint/test/functional/old_style_class_py27.py18
-rw-r--r--pylint/test/functional/old_style_class_py27.rc2
-rw-r--r--pylint/test/functional/old_style_class_py27.txt2
-rw-r--r--pylint/test/functional/super_checks.py6
-rw-r--r--pylint/test/functional/super_checks.txt3
-rw-r--r--pylint/test/functional/undefined_variable.py2
-rw-r--r--pylint/test/input/func_noerror_access_attr_before_def_false_positive.py2
-rw-r--r--pylint/test/messages/func_w0233.txt12
18 files changed, 19 insertions, 103 deletions
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py
index 60c97ca73..ff9b68dd3 100644
--- a/pylint/checkers/spelling.py
+++ b/pylint/checkers/spelling.py
@@ -32,7 +32,7 @@ try:
WikiWordFilter)
except ImportError:
enchant = None
- # pylint: disable=old-style-class,no-init
+ # pylint: disable=no-init
class Filter:
def _skip(self, word):
raise NotImplementedError
diff --git a/pylint/test/functional/access_to__name__.py b/pylint/test/functional/access_to__name__.py
index 1d96ce5eb..82dcdbe78 100644
--- a/pylint/test/functional/access_to__name__.py
+++ b/pylint/test/functional/access_to__name__.py
@@ -4,7 +4,7 @@ but not on new/old class object
"""
from __future__ import print_function
-class Aaaa: # <3.0:[old-style-class]
+class Aaaa:
"""old class"""
def __init__(self):
print(self.__name__) # [no-member]
diff --git a/pylint/test/functional/access_to__name__.txt b/pylint/test/functional/access_to__name__.txt
index ecf5ffd6d..29ec889fb 100644
--- a/pylint/test/functional/access_to__name__.txt
+++ b/pylint/test/functional/access_to__name__.txt
@@ -1,3 +1,2 @@
-old-style-class:7:Aaaa:Old-style class defined.
no-member:10:Aaaa.__init__:Instance of 'Aaaa' has no '__name__' member:INFERENCE
no-member:21:NewClass.__init__:Instance of 'NewClass' has no '__name__' member:INFERENCE
diff --git a/pylint/test/functional/init_not_called.py b/pylint/test/functional/init_not_called.py
index 09a3e98b8..282306489 100644
--- a/pylint/test/functional/init_not_called.py
+++ b/pylint/test/functional/init_not_called.py
@@ -3,19 +3,19 @@
"""
from __future__ import print_function
-class AAAA: # <3.0:[old-style-class]
+class AAAA:
"""ancestor 1"""
def __init__(self):
print('init', self)
-class BBBB: # <3.0:[old-style-class]
+class BBBB:
"""ancestor 2"""
def __init__(self):
print('init', self)
-class CCCC: # <3.0:[old-style-class,no-init]
+class CCCC:
"""ancestor 3"""
diff --git a/pylint/test/functional/init_not_called.txt b/pylint/test/functional/init_not_called.txt
index b0bc41886..955d4181b 100644
--- a/pylint/test/functional/init_not_called.txt
+++ b/pylint/test/functional/init_not_called.txt
@@ -1,6 +1,3 @@
-old-style-class:6:AAAA:Old-style class defined.
-old-style-class:12:BBBB:Old-style class defined.
no-init:18:CCCC:Class has no __init__ method
-old-style-class:18:CCCC:Old-style class defined.
super-init-not-called:25:ZZZZ.__init__:__init__ method from base class 'BBBB' is not called
super-init-not-called:58:AssignedInit.__init__:__init__ method from base class 'NewStyleC' is not called
diff --git a/pylint/test/functional/invalid_exceptions_raised.py b/pylint/test/functional/invalid_exceptions_raised.py
index 74119a64f..ddc8891ff 100644
--- a/pylint/test/functional/invalid_exceptions_raised.py
+++ b/pylint/test/functional/invalid_exceptions_raised.py
@@ -1,4 +1,4 @@
-# pylint:disable=too-few-public-methods,old-style-class,no-init,import-error,missing-docstring, not-callable, useless-object-inheritance
+# pylint:disable=too-few-public-methods,no-init,import-error,missing-docstring, not-callable, useless-object-inheritance
"""test pb with exceptions and old/new style classes"""
diff --git a/pylint/test/functional/namePresetCamelCase.py b/pylint/test/functional/namePresetCamelCase.py
index a5ea54eff..e048ec4d8 100644
--- a/pylint/test/functional/namePresetCamelCase.py
+++ b/pylint/test/functional/namePresetCamelCase.py
@@ -1,4 +1,4 @@
-# pylint: disable=old-style-class,missing-docstring,too-few-public-methods
+# pylint: disable=missing-docstring,too-few-public-methods
__version__ = "1.0"
SOME_CONSTANT = 42 # [invalid-name]
diff --git a/pylint/test/functional/name_preset_snake_case.py b/pylint/test/functional/name_preset_snake_case.py
index d0e0085ce..549888715 100644
--- a/pylint/test/functional/name_preset_snake_case.py
+++ b/pylint/test/functional/name_preset_snake_case.py
@@ -1,4 +1,4 @@
-# pylint: disable=old-style-class,missing-docstring,too-few-public-methods
+# pylint: disable=missing-docstring,too-few-public-methods
__version__ = "1.0"
SOME_CONSTANT = 42 # [invalid-name]
diff --git a/pylint/test/functional/newstyle_properties.py b/pylint/test/functional/newstyle_properties.py
deleted file mode 100644
index 4bdb2a51f..000000000
--- a/pylint/test/functional/newstyle_properties.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# pylint: disable=too-few-public-methods, useless-object-inheritance
-"""Test properties on old style classes and property.setter/deleter usage"""
-
-
-def getter(self):
- """interesting"""
- return self
-
-class CorrectClass(object):
- """correct usage"""
- method = property(getter, doc='hop')
-
-class OldStyleClass: # <3.0:[old-style-class]
- """bad usage"""
- method = property(getter, doc='hop') # <3.0:[property-on-old-class]
-
- def __init__(self):
- pass
-
-
-def decorator(func):
- """Redefining decorator."""
- def wrapped(self):
- """Wrapper function."""
- return func(self)
- return wrapped
-
-
-class SomeClass(object):
- """another docstring"""
-
- def __init__(self):
- self._prop = None
-
- @property
- def prop(self):
- """I'm the 'prop' property."""
- return self._prop
-
- @prop.setter
- def prop(self, value):
- """I'm the 'prop' property."""
- self._prop = value
-
- @prop.deleter
- def prop(self):
- """I'm the 'prop' property."""
- del self._prop
-
- @decorator
- def noregr(self):
- """Just a normal method with a decorator."""
- return self.prop
diff --git a/pylint/test/functional/newstyle_properties.txt b/pylint/test/functional/newstyle_properties.txt
deleted file mode 100644
index a16686b63..000000000
--- a/pylint/test/functional/newstyle_properties.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-old-style-class:13:OldStyleClass:Old-style class defined.
-property-on-old-class:15:OldStyleClass:"Use of ""property"" on an old style class":INFERENCE
diff --git a/pylint/test/functional/old_style_class_py27.py b/pylint/test/functional/old_style_class_py27.py
deleted file mode 100644
index 114932541..000000000
--- a/pylint/test/functional/old_style_class_py27.py
+++ /dev/null
@@ -1,18 +0,0 @@
-""" Tests for old style classes. """
-# pylint: disable=no-init, too-few-public-methods, invalid-name, metaclass-assignment
-
-class Old: # [old-style-class]
- """ old style class """
-
-class Child(Old):
- """ Old style class, but don't emit for it. """
-
-class NotOldStyle2:
- """ Because I have a metaclass at class level. """
- __metaclass__ = type
-
-# pylint: disable=redefined-builtin
-__metaclass__ = type
-
-class NotOldStyle:
- """ Because I have a metaclass at global level. """
diff --git a/pylint/test/functional/old_style_class_py27.rc b/pylint/test/functional/old_style_class_py27.rc
deleted file mode 100644
index a65023393..000000000
--- a/pylint/test/functional/old_style_class_py27.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-[testoptions]
-max_pyver=3.0
diff --git a/pylint/test/functional/old_style_class_py27.txt b/pylint/test/functional/old_style_class_py27.txt
deleted file mode 100644
index c46a7b614..000000000
--- a/pylint/test/functional/old_style_class_py27.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-old-style-class:4:Old:Old-style class defined.
-old-style-class:7:Child:Old-style class defined.
diff --git a/pylint/test/functional/super_checks.py b/pylint/test/functional/super_checks.py
index c7afe04f3..3888488fe 100644
--- a/pylint/test/functional/super_checks.py
+++ b/pylint/test/functional/super_checks.py
@@ -3,13 +3,13 @@
from unknown import Missing
-class Aaaa: # <3.0:[old-style-class]
+class Aaaa:
"""old style"""
- def hop(self): # <3.0:[super-on-old-class]
+ def hop(self):
"""hop"""
super(Aaaa, self).hop() # >=3.0:[no-member]
- def __init__(self): # <3.0:[super-on-old-class]
+ def __init__(self):
super(Aaaa, self).__init__()
class NewAaaa(object):
diff --git a/pylint/test/functional/super_checks.txt b/pylint/test/functional/super_checks.txt
index 4710682df..4911a6c86 100644
--- a/pylint/test/functional/super_checks.txt
+++ b/pylint/test/functional/super_checks.txt
@@ -1,7 +1,4 @@
-old-style-class:6:Aaaa:Old-style class defined.
-super-on-old-class:8:Aaaa.hop:Use of super on an old style class
no-member:10:Aaaa.hop:Super of 'Aaaa' has no 'hop' member:INFERENCE
-super-on-old-class:12:Aaaa.__init__:Use of super on an old style class
no-member:19:NewAaaa.hop:Super of 'NewAaaa' has no 'hop' member:INFERENCE
bad-super-call:22:NewAaaa.__init__:Bad first argument 'Aaaa' given to super()
missing-super-argument:27:Py3kAaaa.__init__:Missing argument to super()
diff --git a/pylint/test/functional/undefined_variable.py b/pylint/test/functional/undefined_variable.py
index 442464a73..eba4f4142 100644
--- a/pylint/test/functional/undefined_variable.py
+++ b/pylint/test/functional/undefined_variable.py
@@ -1,5 +1,5 @@
# pylint: disable=missing-docstring, multiple-statements, useless-object-inheritance
-# pylint: disable=too-few-public-methods, no-init, no-self-use, old-style-class,bare-except,broad-except
+# pylint: disable=too-few-public-methods, no-init, no-self-use,bare-except,broad-except
from __future__ import print_function
DEFINED = 1
diff --git a/pylint/test/input/func_noerror_access_attr_before_def_false_positive.py b/pylint/test/input/func_noerror_access_attr_before_def_false_positive.py
index bb7eab2b5..3884c9980 100644
--- a/pylint/test/input/func_noerror_access_attr_before_def_false_positive.py
+++ b/pylint/test/input/func_noerror_access_attr_before_def_false_positive.py
@@ -1,4 +1,4 @@
-#pylint: disable=C0103,R0904,R0903,W0201,old-style-class,no-absolute-import, useless-object-inheritance
+#pylint: disable=C0103,R0904,R0903,W0201,no-absolute-import, useless-object-inheritance
"""
This module demonstrates a possible problem of pyLint with calling __init__ s
from inherited classes.
diff --git a/pylint/test/messages/func_w0233.txt b/pylint/test/messages/func_w0233.txt
index 7c7780e74..de4f0fba9 100644
--- a/pylint/test/messages/func_w0233.txt
+++ b/pylint/test/messages/func_w0233.txt
@@ -1,6 +1,6 @@
-E: 6: Unable to import 'nonexistant'
-E: 22:CCC: Module 'input.func_w0233' has no 'BBBB' member
-E: 27:CCC.__init__: Module 'input.func_w0233' has no 'BBBB' member
-E: 50:Super2.__init__: Super of 'Super2' has no '__woohoo__' member
-W: 14:AAAA.__init__: __init__ method from a non direct base class 'BBBBMixin' is called
-W: 48:Super2.__init__: __init__ method from base class 'dict' is not called
+E: 7: Unable to import 'nonexistant'
+E: 23:CCC: Module 'input.func_w0233' has no 'BBBB' member
+E: 28:CCC.__init__: Module 'input.func_w0233' has no 'BBBB' member
+E: 51:Super2.__init__: Super of 'Super2' has no '__woohoo__' member
+W: 15:AAAA.__init__: __init__ method from a non direct base class 'BBBBMixin' is called
+W: 49:Super2.__init__: __init__ method from base class 'dict' is not called