pylint: Fix useless-object-inheritance
https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/useless-object-inheritance.html: > Used when a class inherit from object, which under python3 is implicit, hence can be safely removed from bases. Fixes: https://pagure.io/freeipa/issue/9278 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Stanislav Levin <slev@altlinux.org>
This commit is contained in:
1 parent
c523e85835
commit
b8480549c6
5 files changed
+6
-10
No files matched your search
@@ -58,7 +58,7 @@ class KnobValueError(ValueError):
|
|||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
|
|
||||||
class PropertyBase(six.with_metaclass(util.InnerClassMeta, object)):
|
class PropertyBase(metaclass=util.InnerClassMeta):
|
||||||
# shut up pylint
|
# shut up pylint
|
||||||
__outer_class__ = None
|
__outer_class__ = None
|
||||||
__outer_name__ = None
|
__outer_name__ = None
|
||||||
@@ -227,7 +227,7 @@ def extend_knob(base, default=_missing, bases=_missing, group=_missing,
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Configurable(six.with_metaclass(abc.ABCMeta, object)):
|
class Configurable(metaclass=abc.ABCMeta):
|
||||||
"""
|
"""
|
||||||
Base class of all configurables.
|
Base class of all configurables.
|
||||||
|
|
||||||
@@ -487,7 +487,7 @@ class ComponentMeta(util.InnerClassMeta, abc.ABCMeta):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ComponentBase(six.with_metaclass(ComponentMeta, Configurable)):
|
class ComponentBase(Configurable, metaclass=ComponentMeta):
|
||||||
# shut up pylint
|
# shut up pylint
|
||||||
__outer_class__ = None
|
__outer_class__ = None
|
||||||
__outer_name__ = None
|
__outer_name__ = None
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
_cache = weakref.WeakValueDictionary()
|
_cache = weakref.WeakValueDictionary()
|
||||||
|
|
||||||
@@ -27,7 +26,7 @@ class ListMeta(type):
|
|||||||
return _cache.get(key, t)
|
return _cache.get(key, t)
|
||||||
|
|
||||||
|
|
||||||
class List(six.with_metaclass(ListMeta, list)):
|
class List(list, metaclass=ListMeta):
|
||||||
__parameters__ = ()
|
__parameters__ = ()
|
||||||
|
|
||||||
def __init__(self, *_args, **_kwargs):
|
def __init__(self, *_args, **_kwargs):
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ def convertEncrypted(value, decryptor=None, pconv=base64.b64decode, econv=lambda
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class XMLKeyDerivation(six.with_metaclass(abc.ABCMeta, object)):
|
class XMLKeyDerivation(metaclass=abc.ABCMeta):
|
||||||
"Interface for XML Encryption 1.1 key derivation."
|
"Interface for XML Encryption 1.1 key derivation."
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def __init__(self, enckey):
|
def __init__(self, enckey):
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
#
|
#
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
import itertools
|
import itertools
|
||||||
@@ -17,7 +15,7 @@ from ipaserver.install.ipa_replica_install import ReplicaInstall
|
|||||||
Keyval = namedtuple('Keyval', ['option', 'value'])
|
Keyval = namedtuple('Keyval', ['option', 'value'])
|
||||||
|
|
||||||
|
|
||||||
class InstallerTestBase(six.with_metaclass(ABCMeta, object)):
|
class InstallerTestBase(metaclass=ABCMeta):
|
||||||
OPTS_DICT = {}
|
OPTS_DICT = {}
|
||||||
|
|
||||||
# don't allow creating classes with tested_cls unspecified
|
# don't allow creating classes with tested_cls unspecified
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ disable=
|
|||||||
use-list-literal, # pylint 2.10.0 list() vs []
|
use-list-literal, # pylint 2.10.0 list() vs []
|
||||||
unspecified-encoding, # pylint 2.10.0, ASCII or UTF8 and platform-specific
|
unspecified-encoding, # pylint 2.10.0, ASCII or UTF8 and platform-specific
|
||||||
use-implicit-booleaness-not-comparison, # pylint 2.12.2, weak comparison
|
use-implicit-booleaness-not-comparison, # pylint 2.12.2, weak comparison
|
||||||
useless-object-inheritance,
|
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user