summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--doc/messages/messages_list.rst1
-rw-r--r--doc/whatsnew/2.14.rst3
-rw-r--r--pylint/checkers/classes/class_checker.py12
-rw-r--r--pylint/checkers/typecheck.py1
-rw-r--r--pylint/constants.py2
-rw-r--r--tests/functional/a/abstract/abstract_method.py2
-rw-r--r--tests/functional/a/assigning/assigning_non_slot.py2
-rw-r--r--tests/functional/c/class_members_py30.py2
-rw-r--r--tests/functional/c/class_scope.py2
-rw-r--r--tests/functional/c/classes_meth_could_be_a_function.py2
-rw-r--r--tests/functional/c/confidence_filter.rc2
-rw-r--r--tests/functional/c/crash_missing_module_type.py2
-rw-r--r--tests/functional/d/decorator_scope.py2
-rw-r--r--tests/functional/d/duplicate_bases.py2
-rw-r--r--tests/functional/e/external_classmethod_crash.py2
-rw-r--r--tests/functional/f/first_arg.py2
-rw-r--r--tests/functional/g/genexp_in_class_scope.py2
-rw-r--r--tests/functional/i/inconsistent/inconsistent_mro.py2
-rw-r--r--tests/functional/i/inherit_non_class.py2
-rw-r--r--tests/functional/i/init_not_called.py41
-rw-r--r--tests/functional/i/init_not_called.txt4
-rw-r--r--tests/functional/i/init_subclass_classmethod.py2
-rw-r--r--tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.py2
-rw-r--r--tests/functional/i/iterable_context.py2
-rw-r--r--tests/functional/i/iterable_context_py3.py2
-rw-r--r--tests/functional/m/membership_protocol.py2
-rw-r--r--tests/functional/m/membership_protocol_py3.py2
-rw-r--r--tests/functional/n/no/no_self_use_py3.py2
-rw-r--r--tests/functional/n/not_context_manager.py2
-rw-r--r--tests/functional/o/overridden_final_method_py38.py2
-rw-r--r--tests/functional/s/subclassed_final_class_py38.py2
-rw-r--r--tests/functional/u/undefined/undefined_variable.py2
-rw-r--r--tests/functional/u/undefined/undefined_variable_py30.py2
-rw-r--r--tests/functional/u/unpacking/unpacking_non_sequence.py2
-rw-r--r--tests/functional/u/used/used_before_assignment_nonlocal.py2
-rw-r--r--tests/functional/u/useless/useless_object_inheritance.py2
-rw-r--r--tests/functional/u/using_constant_test.py2
38 files changed, 62 insertions, 66 deletions
diff --git a/ChangeLog b/ChangeLog
index e0dae62ad..027ee88c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,10 @@ Release date: TBA
Closes #5224
+* The ``no-init`` (W0232) warning has been removed. It's ok to not have an ``__init__`` in a class.
+
+ Closes #2409
+
* The ``config`` attribute of ``BaseChecker`` has been deprecated. You can use ``checker.linter.config``
to access the global configuration object instead of a checker-specific object.
diff --git a/doc/messages/messages_list.rst b/doc/messages/messages_list.rst
index e25603f74..b2f0cf54d 100644
--- a/doc/messages/messages_list.rst
+++ b/doc/messages/messages_list.rst
@@ -265,7 +265,6 @@ All messages in the warning category:
warning/modified-iterating-list.rst
warning/multiple-constructor-doc.rst
warning/nan-comparison.rst
- warning/no-init.rst
warning/non-ascii-file-name.rst
warning/non-parent-init-called.rst
warning/non-str-assignment-to-dunder-name.rst
diff --git a/doc/whatsnew/2.14.rst b/doc/whatsnew/2.14.rst
index 3601043f8..cd29101da 100644
--- a/doc/whatsnew/2.14.rst
+++ b/doc/whatsnew/2.14.rst
@@ -47,6 +47,9 @@ New checkers
Removed checkers
================
+* The ``no-init`` (W0232) warning has been removed. It's ok to not have an ``__init__`` in a class.
+
+ Closes #2409
Extensions
==========
diff --git a/pylint/checkers/classes/class_checker.py b/pylint/checkers/classes/class_checker.py
index 81ff73ff0..0dfc2a2f5 100644
--- a/pylint/checkers/classes/class_checker.py
+++ b/pylint/checkers/classes/class_checker.py
@@ -535,11 +535,6 @@ MSGS = { # pylint: disable=consider-using-namedtuple-or-dataclass
"Used when an ancestor class method has an __init__ method "
"which is not called by a derived class.",
),
- "W0232": (
- "Class has no __init__ method",
- "no-init",
- "Used when a class has no __init__ method, neither its parent classes.",
- ),
"W0233": (
"__init__ method from a non direct base class %r is called",
"non-parent-init-called",
@@ -784,7 +779,6 @@ a metaclass class method.",
@check_messages(
"abstract-method",
- "no-init",
"invalid-slots",
"single-string-used-for-slots",
"invalid-slots-object",
@@ -800,12 +794,6 @@ a metaclass class method.",
def visit_classdef(self, node: nodes.ClassDef) -> None:
"""Init visit variable _accessed."""
self._check_bases_classes(node)
- # if not an exception or a metaclass
- if node.type == "class" and has_known_bases(node):
- try:
- node.local_attr("__init__")
- except astroid.NotFoundError:
- self.add_message("no-init", args=node, node=node)
self._check_slots(node)
self._check_proper_bases(node)
self._check_typing_final(node)
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index 5b55185ae..9f899b302 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -565,7 +565,6 @@ def _determine_callable(
# Use the last definition of __init__.
callable_obj = callable_obj.local_attr("__init__")[-1]
except astroid.NotFoundError as e:
- # do nothing, covered by no-init.
raise ValueError from e
else:
callable_obj = new
diff --git a/pylint/constants.py b/pylint/constants.py
index 0dbb479b3..2fe436579 100644
--- a/pylint/constants.py
+++ b/pylint/constants.py
@@ -184,6 +184,8 @@ DELETED_MESSAGES = [
DeletedMessage("C0326", "bad-whitespace"),
# Pylint 1.4.3
DeletedMessage("W0142", "star-args"),
+ # https://github.com/PyCQA/pylint/issues/2409
+ DeletedMessage("W0232", "no-init"),
]
diff --git a/tests/functional/a/abstract/abstract_method.py b/tests/functional/a/abstract/abstract_method.py
index be924469d..cbcc318f1 100644
--- a/tests/functional/a/abstract/abstract_method.py
+++ b/tests/functional/a/abstract/abstract_method.py
@@ -1,7 +1,7 @@
"""Test abstract-method warning."""
from __future__ import print_function
-# pylint: disable=missing-docstring, no-init, no-self-use
+# pylint: disable=missing-docstring, no-self-use
# pylint: disable=too-few-public-methods, useless-object-inheritance
import abc
diff --git a/tests/functional/a/assigning/assigning_non_slot.py b/tests/functional/a/assigning/assigning_non_slot.py
index 0a0c0427c..d4e9d1d45 100644
--- a/tests/functional/a/assigning/assigning_non_slot.py
+++ b/tests/functional/a/assigning/assigning_non_slot.py
@@ -1,7 +1,7 @@
""" Checks assigning attributes not found in class slots
will trigger assigning-non-slot warning.
"""
-# pylint: disable=too-few-public-methods, no-init, missing-docstring, import-error, useless-object-inheritance, redundant-u-string-prefix, unnecessary-dunder-call
+# pylint: disable=too-few-public-methods, missing-docstring, import-error, useless-object-inheritance, redundant-u-string-prefix, unnecessary-dunder-call
from collections import deque
from missing import Unknown
diff --git a/tests/functional/c/class_members_py30.py b/tests/functional/c/class_members_py30.py
index 2e34127e3..afaee5872 100644
--- a/tests/functional/c/class_members_py30.py
+++ b/tests/functional/c/class_members_py30.py
@@ -1,5 +1,5 @@
""" Various tests for class members access. """
-# pylint: disable=too-few-public-methods,import-error,no-init,missing-docstring, wrong-import-position,wrong-import-order, useless-object-inheritance, unnecessary-dunder-call
+# pylint: disable=too-few-public-methods,import-error,missing-docstring, wrong-import-position,wrong-import-order, useless-object-inheritance, unnecessary-dunder-call
from missing import Missing
class MyClass(object):
"""class docstring"""
diff --git a/tests/functional/c/class_scope.py b/tests/functional/c/class_scope.py
index a22ba721b..d86ebf95e 100644
--- a/tests/functional/c/class_scope.py
+++ b/tests/functional/c/class_scope.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-few-public-methods,no-init, useless-object-inheritance
+# pylint: disable=too-few-public-methods, useless-object-inheritance
"""check for scope problems"""
__revision__ = None
diff --git a/tests/functional/c/classes_meth_could_be_a_function.py b/tests/functional/c/classes_meth_could_be_a_function.py
index 3abda55a0..96efb85c1 100644
--- a/tests/functional/c/classes_meth_could_be_a_function.py
+++ b/tests/functional/c/classes_meth_could_be_a_function.py
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring,too-few-public-methods,no-init,useless-object-inheritance
+# pylint: disable=missing-docstring,too-few-public-methods,useless-object-inheritance
"""
#2479
diff --git a/tests/functional/c/confidence_filter.rc b/tests/functional/c/confidence_filter.rc
index 5d21cb56e..ba726dfa1 100644
--- a/tests/functional/c/confidence_filter.rc
+++ b/tests/functional/c/confidence_filter.rc
@@ -1,3 +1,3 @@
[Messages Control]
-disable=no-init,too-few-public-methods,undefined-variable
+disable=too-few-public-methods,undefined-variable
confidence=INFERENCE,HIGH,UNDEFINED
diff --git a/tests/functional/c/crash_missing_module_type.py b/tests/functional/c/crash_missing_module_type.py
index 308606ff4..d80d27afc 100644
--- a/tests/functional/c/crash_missing_module_type.py
+++ b/tests/functional/c/crash_missing_module_type.py
@@ -1,7 +1,7 @@
""" Test for a crash found in
https://bitbucket.org/logilab/astroid/issue/45/attributeerror-module-object-has-no#comment-11944673
"""
-# pylint: disable=no-init, invalid-name, too-few-public-methods, redefined-outer-name, useless-object-inheritance
+# pylint: disable=invalid-name, too-few-public-methods, redefined-outer-name, useless-object-inheritance
def decor(trop):
""" decorator """
return trop
diff --git a/tests/functional/d/decorator_scope.py b/tests/functional/d/decorator_scope.py
index 141c26d06..8ed169dee 100644
--- a/tests/functional/d/decorator_scope.py
+++ b/tests/functional/d/decorator_scope.py
@@ -1,4 +1,4 @@
-# -*- pylint: disable=no-init,too-few-public-methods, useless-object-inheritance
+# -*- pylint: disable=too-few-public-methods, useless-object-inheritance
"""Test that decorators sees the class namespace - just like
function default values does but function body doesn't.
diff --git a/tests/functional/d/duplicate_bases.py b/tests/functional/d/duplicate_bases.py
index 51b329a4f..3290a6b29 100644
--- a/tests/functional/d/duplicate_bases.py
+++ b/tests/functional/d/duplicate_bases.py
@@ -1,5 +1,5 @@
"""Test duplicate bases error."""
-# pylint: disable=missing-docstring,too-few-public-methods,no-init
+# pylint: disable=missing-docstring,too-few-public-methods
class Duplicates(str, str): # [duplicate-bases]
diff --git a/tests/functional/e/external_classmethod_crash.py b/tests/functional/e/external_classmethod_crash.py
index 7f6b927af..c24bbd872 100644
--- a/tests/functional/e/external_classmethod_crash.py
+++ b/tests/functional/e/external_classmethod_crash.py
@@ -1,4 +1,4 @@
-# pylint: disable=no-init,too-few-public-methods,unused-argument,useless-object-inheritance
+# pylint: disable=too-few-public-methods,unused-argument,useless-object-inheritance
"""tagging a function as a class method cause a crash when checking for
signature overriding
"""
diff --git a/tests/functional/f/first_arg.py b/tests/functional/f/first_arg.py
index 0b5c0804b..16824d4f2 100644
--- a/tests/functional/f/first_arg.py
+++ b/tests/functional/f/first_arg.py
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring, no-init, useless-object-inheritance
+# pylint: disable=missing-docstring, useless-object-inheritance
"""check for methods first arguments
"""
diff --git a/tests/functional/g/genexp_in_class_scope.py b/tests/functional/g/genexp_in_class_scope.py
index 056963813..93e0ceaae 100644
--- a/tests/functional/g/genexp_in_class_scope.py
+++ b/tests/functional/g/genexp_in_class_scope.py
@@ -1,4 +1,4 @@
-# pylint: disable=no-init,too-few-public-methods, missing-docstring
+# pylint: disable=too-few-public-methods, missing-docstring
# pylint: disable=useless-object-inheritance
"""Class scope must be handled correctly in genexps"""
class MyClass(object):
diff --git a/tests/functional/i/inconsistent/inconsistent_mro.py b/tests/functional/i/inconsistent/inconsistent_mro.py
index 0b65068d7..0e2ecb9c2 100644
--- a/tests/functional/i/inconsistent/inconsistent_mro.py
+++ b/tests/functional/i/inconsistent/inconsistent_mro.py
@@ -1,5 +1,5 @@
"""Tests for inconsistent-mro."""
-# pylint: disable=missing-docstring,too-few-public-methods,no-init
+# pylint: disable=missing-docstring,too-few-public-methods
class Str(str):
pass
diff --git a/tests/functional/i/inherit_non_class.py b/tests/functional/i/inherit_non_class.py
index e741c7353..b0ed93df7 100644
--- a/tests/functional/i/inherit_non_class.py
+++ b/tests/functional/i/inherit_non_class.py
@@ -1,7 +1,7 @@
"""Test that inheriting from something which is not
a class emits a warning. """
-# pylint: disable=no-init, import-error, invalid-name, using-constant-test, useless-object-inheritance
+# pylint: disable=import-error, invalid-name, using-constant-test, useless-object-inheritance
# pylint: disable=missing-docstring, too-few-public-methods
from missing import Missing
diff --git a/tests/functional/i/init_not_called.py b/tests/functional/i/init_not_called.py
index 8f646eb26..a95efadf6 100644
--- a/tests/functional/i/init_not_called.py
+++ b/tests/functional/i/init_not_called.py
@@ -1,19 +1,26 @@
-# pylint: disable=too-few-public-methods,import-error,missing-docstring,wrong-import-position,useless-super-delegation, useless-object-inheritance, unnecessary-pass
-"""test for __init__ not called
-"""
+# pylint: disable=too-few-public-methods, import-error, missing-docstring, wrong-import-position
+# pylint: disable=useless-super-delegation, useless-object-inheritance, unnecessary-pass
+
from __future__ import print_function
+from typing import overload
+
+from missing import Missing
+
+
class AAAA:
"""ancestor 1"""
def __init__(self):
- print('init', self)
+ print("init", self)
+
class BBBB:
"""ancestor 2"""
def __init__(self):
- print('init', self)
+ print("init", self)
+
class CCCC:
"""ancestor 3"""
@@ -25,55 +32,49 @@ class ZZZZ(AAAA, BBBB, CCCC):
def __init__(self): # [super-init-not-called]
AAAA.__init__(self)
+
class NewStyleA(object):
"""new style class"""
+
def __init__(self):
super().__init__()
- print('init', self)
+ print("init", self)
+
class NewStyleB(NewStyleA):
"""derived new style class"""
+
def __init__(self):
super().__init__()
-class NoInit(object):
- """No __init__ defined"""
-
-class Init(NoInit):
- """Don't complain for not calling the super __init__"""
-
- def __init__(self, arg):
- self.arg = arg
class NewStyleC(object):
"""__init__ defined by assignment."""
+
def xx_init(self):
"""Initializer."""
pass
__init__ = xx_init
+
class AssignedInit(NewStyleC):
"""No init called."""
+
def __init__(self): # [super-init-not-called]
self.arg = 0
-from missing import Missing
class UnknownBases(Missing):
- """Don't emit no-init if the bases aren't known."""
-
+ """No false positives if the bases aren't known."""
-from typing import overload # pylint: disable=wrong-import-order
class Parent:
-
def __init__(self, num: int):
self.number = num
class Child(Parent):
-
@overload
def __init__(self, num: int):
...
diff --git a/tests/functional/i/init_not_called.txt b/tests/functional/i/init_not_called.txt
index ae5e8f91f..9015d1e27 100644
--- a/tests/functional/i/init_not_called.txt
+++ b/tests/functional/i/init_not_called.txt
@@ -1,2 +1,2 @@
-super-init-not-called:25:4:25:16:ZZZZ.__init__:__init__ method from base class 'BBBB' is not called:INFERENCE
-super-init-not-called:58:4:58:16:AssignedInit.__init__:__init__ method from base class 'NewStyleC' is not called:INFERENCE
+super-init-not-called:32:4:32:16:ZZZZ.__init__:__init__ method from base class 'BBBB' is not called:INFERENCE
+super-init-not-called:64:4:64:16:AssignedInit.__init__:__init__ method from base class 'NewStyleC' is not called:INFERENCE
diff --git a/tests/functional/i/init_subclass_classmethod.py b/tests/functional/i/init_subclass_classmethod.py
index ad379705d..8153aa2d4 100644
--- a/tests/functional/i/init_subclass_classmethod.py
+++ b/tests/functional/i/init_subclass_classmethod.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-few-public-methods, missing-docstring,no-init, useless-object-inheritance
+# pylint: disable=too-few-public-methods, missing-docstring, useless-object-inheritance
class PluginBase(object):
subclasses = []
diff --git a/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.py b/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.py
index 3b4229741..f7e52819d 100644
--- a/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.py
+++ b/tests/functional/i/invalid/invalid_exceptions/invalid_exceptions_raised.py
@@ -1,4 +1,4 @@
-# pylint:disable=too-few-public-methods,no-init,import-error,missing-docstring, not-callable, useless-object-inheritance,import-outside-toplevel
+# pylint:disable=too-few-public-methods,import-error,missing-docstring, not-callable, useless-object-inheritance,import-outside-toplevel
"""test pb with exceptions and old/new style classes"""
diff --git a/tests/functional/i/iterable_context.py b/tests/functional/i/iterable_context.py
index 2754d179f..0d221eef9 100644
--- a/tests/functional/i/iterable_context.py
+++ b/tests/functional/i/iterable_context.py
@@ -2,7 +2,7 @@
Checks that primitive values are not used in an
iterating/mapping context.
"""
-# pylint: disable=missing-docstring,invalid-name,too-few-public-methods,no-init,no-self-use,import-error,unused-argument,bad-mcs-method-argument,wrong-import-position,no-else-return, useless-object-inheritance, unnecessary-comprehension,redundant-u-string-prefix
+# pylint: disable=missing-docstring,invalid-name,too-few-public-methods,no-self-use,import-error,unused-argument,bad-mcs-method-argument,wrong-import-position,no-else-return, useless-object-inheritance, unnecessary-comprehension,redundant-u-string-prefix
from __future__ import print_function
# primitives
diff --git a/tests/functional/i/iterable_context_py3.py b/tests/functional/i/iterable_context_py3.py
index 34047eda0..51daff7ed 100644
--- a/tests/functional/i/iterable_context_py3.py
+++ b/tests/functional/i/iterable_context_py3.py
@@ -1,7 +1,7 @@
"""
Checks that iterable metaclasses are recognized by pylint.
"""
-# pylint: disable=missing-docstring,too-few-public-methods,no-init,no-self-use,unused-argument,bad-mcs-method-argument
+# pylint: disable=missing-docstring,too-few-public-methods,no-self-use,unused-argument,bad-mcs-method-argument
# pylint: disable=wrong-import-position
# metaclasses as iterables
class Meta(type):
diff --git a/tests/functional/m/membership_protocol.py b/tests/functional/m/membership_protocol.py
index e5efc8916..b9a0197ca 100644
--- a/tests/functional/m/membership_protocol.py
+++ b/tests/functional/m/membership_protocol.py
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring,pointless-statement,expression-not-assigned,too-few-public-methods,import-error,no-init,wrong-import-position,no-else-return, comparison-with-itself, useless-object-inheritance, redundant-u-string-prefix
+# pylint: disable=missing-docstring,pointless-statement,expression-not-assigned,too-few-public-methods,import-error,wrong-import-position,no-else-return, comparison-with-itself, useless-object-inheritance, redundant-u-string-prefix
# standard types
1 in [1, 2, 3]
diff --git a/tests/functional/m/membership_protocol_py3.py b/tests/functional/m/membership_protocol_py3.py
index 678072354..ee33088d5 100644
--- a/tests/functional/m/membership_protocol_py3.py
+++ b/tests/functional/m/membership_protocol_py3.py
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring,too-few-public-methods,no-init,no-self-use,unused-argument,pointless-statement,expression-not-assigned
+# pylint: disable=missing-docstring,too-few-public-methods,no-self-use,unused-argument,pointless-statement,expression-not-assigned
# metaclasses that support membership test protocol
class MetaIterable(type):
diff --git a/tests/functional/n/no/no_self_use_py3.py b/tests/functional/n/no/no_self_use_py3.py
index f40150835..80bbe06da 100644
--- a/tests/functional/n/no/no_self_use_py3.py
+++ b/tests/functional/n/no/no_self_use_py3.py
@@ -1,4 +1,4 @@
-# pylint: disable=missing-docstring,no-init,unused-argument,invalid-name,too-few-public-methods
+# pylint: disable=missing-docstring,unused-argument,invalid-name,too-few-public-methods
class A:
def __init__(self):
diff --git a/tests/functional/n/not_context_manager.py b/tests/functional/n/not_context_manager.py
index a59f5a200..2678f265e 100644
--- a/tests/functional/n/not_context_manager.py
+++ b/tests/functional/n/not_context_manager.py
@@ -1,7 +1,7 @@
"""Tests that onjects used in a with statement implement context manager protocol"""
# pylint: disable=too-few-public-methods, invalid-name, import-error, missing-docstring
-# pylint: disable=no-init,wrong-import-position, useless-object-inheritance
+# pylint: disable=wrong-import-position, useless-object-inheritance
# Tests no messages for objects that implement the protocol
class Manager(object):
def __enter__(self):
diff --git a/tests/functional/o/overridden_final_method_py38.py b/tests/functional/o/overridden_final_method_py38.py
index d74a34051..26498e777 100644
--- a/tests/functional/o/overridden_final_method_py38.py
+++ b/tests/functional/o/overridden_final_method_py38.py
@@ -1,7 +1,7 @@
"""Since Python version 3.8, a method decorated with typing.final cannot be
overridden"""
-# pylint: disable=no-init, useless-object-inheritance, missing-docstring, too-few-public-methods
+# pylint: disable=useless-object-inheritance, missing-docstring, too-few-public-methods
from typing import final
diff --git a/tests/functional/s/subclassed_final_class_py38.py b/tests/functional/s/subclassed_final_class_py38.py
index 7f0671e75..6aca83352 100644
--- a/tests/functional/s/subclassed_final_class_py38.py
+++ b/tests/functional/s/subclassed_final_class_py38.py
@@ -1,7 +1,7 @@
"""Since Python version 3.8, a class decorated with typing.final cannot be
subclassed """
-# pylint: disable=no-init, useless-object-inheritance, missing-docstring, too-few-public-methods
+# pylint: disable=useless-object-inheritance, missing-docstring, too-few-public-methods
from typing import final
diff --git a/tests/functional/u/undefined/undefined_variable.py b/tests/functional/u/undefined/undefined_variable.py
index 22595b42c..7d15b8752 100644
--- a/tests/functional/u/undefined/undefined_variable.py
+++ b/tests/functional/u/undefined/undefined_variable.py
@@ -1,5 +1,5 @@
# pylint: disable=missing-docstring, multiple-statements, useless-object-inheritance, import-outside-toplevel
-# pylint: disable=too-few-public-methods, no-init, no-self-use, bare-except, broad-except
+# pylint: disable=too-few-public-methods, no-self-use, bare-except, broad-except
# pylint: disable=using-constant-test, import-error, global-variable-not-assigned, unnecessary-comprehension
from __future__ import print_function
diff --git a/tests/functional/u/undefined/undefined_variable_py30.py b/tests/functional/u/undefined/undefined_variable_py30.py
index b9b64ec5e..78112189e 100644
--- a/tests/functional/u/undefined/undefined_variable_py30.py
+++ b/tests/functional/u/undefined/undefined_variable_py30.py
@@ -1,6 +1,6 @@
"""Test warnings about access to undefined variables
for various Python 3 constructs. """
-# pylint: disable=too-few-public-methods, no-init, no-self-use, import-error
+# pylint: disable=too-few-public-methods, no-self-use, import-error
# pylint: disable=wrong-import-position, invalid-metaclass, useless-object-inheritance
class Undefined:
""" test various annotation problems. """
diff --git a/tests/functional/u/unpacking/unpacking_non_sequence.py b/tests/functional/u/unpacking/unpacking_non_sequence.py
index 0299af762..a201a75cb 100644
--- a/tests/functional/u/unpacking/unpacking_non_sequence.py
+++ b/tests/functional/u/unpacking/unpacking_non_sequence.py
@@ -1,7 +1,7 @@
"""Check unpacking non-sequences in assignments. """
# pylint: disable=too-few-public-methods, invalid-name, attribute-defined-outside-init, unused-variable
-# pylint: disable=using-constant-test, no-init, missing-docstring, wrong-import-order,wrong-import-position,no-else-return, useless-object-inheritance
+# pylint: disable=using-constant-test, missing-docstring, wrong-import-order,wrong-import-position,no-else-return, useless-object-inheritance
from os import rename as nonseq_func
from functional.u.unpacking.unpacking import nonseq
from typing import NamedTuple
diff --git a/tests/functional/u/used/used_before_assignment_nonlocal.py b/tests/functional/u/used/used_before_assignment_nonlocal.py
index aa0b654b7..d651bcf11 100644
--- a/tests/functional/u/used/used_before_assignment_nonlocal.py
+++ b/tests/functional/u/used/used_before_assignment_nonlocal.py
@@ -1,5 +1,5 @@
"""Check for nonlocal and used-before-assignment"""
-# pylint: disable=missing-docstring, unused-variable, no-init, too-few-public-methods
+# pylint: disable=missing-docstring, unused-variable, too-few-public-methods
__revision__ = 0
diff --git a/tests/functional/u/useless/useless_object_inheritance.py b/tests/functional/u/useless/useless_object_inheritance.py
index 562c81f6a..5c23d2147 100644
--- a/tests/functional/u/useless/useless_object_inheritance.py
+++ b/tests/functional/u/useless/useless_object_inheritance.py
@@ -1,7 +1,7 @@
"""Check if a class inherits from object.
In python3 every class implicitly inherits from object, therefore give refactoring message to
remove object from bases"""
-# pylint: disable=no-init, invalid-name, missing-docstring, too-few-public-methods
+# pylint: disable=invalid-name, missing-docstring, too-few-public-methods
# pylint: disable=inconsistent-mro
import abc
diff --git a/tests/functional/u/using_constant_test.py b/tests/functional/u/using_constant_test.py
index ca1ce013c..9b62667b7 100644
--- a/tests/functional/u/using_constant_test.py
+++ b/tests/functional/u/using_constant_test.py
@@ -1,6 +1,6 @@
"""Verify if constant tests are used inside if statements."""
# pylint: disable=invalid-name, missing-docstring,too-few-public-methods
-# pylint: disable=no-init,expression-not-assigned, useless-object-inheritance
+# pylint: disable=expression-not-assigned, useless-object-inheritance
# pylint: disable=missing-parentheses-for-call-in-test, unnecessary-comprehension, condition-evals-to-constant
# pylint: disable=use-list-literal, use-dict-literal