mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Florence Blanc-Renaud
parent
c523e85835
commit
b8480549c6
@@ -58,7 +58,7 @@ class KnobValueError(ValueError):
|
||||
self.name = name
|
||||
|
||||
|
||||
class PropertyBase(six.with_metaclass(util.InnerClassMeta, object)):
|
||||
class PropertyBase(metaclass=util.InnerClassMeta):
|
||||
# shut up pylint
|
||||
__outer_class__ = 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.
|
||||
|
||||
@@ -487,7 +487,7 @@ class ComponentMeta(util.InnerClassMeta, abc.ABCMeta):
|
||||
pass
|
||||
|
||||
|
||||
class ComponentBase(six.with_metaclass(ComponentMeta, Configurable)):
|
||||
class ComponentBase(Configurable, metaclass=ComponentMeta):
|
||||
# shut up pylint
|
||||
__outer_class__ = None
|
||||
__outer_name__ = None
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import weakref
|
||||
|
||||
import six
|
||||
|
||||
_cache = weakref.WeakValueDictionary()
|
||||
|
||||
@@ -27,7 +26,7 @@ class ListMeta(type):
|
||||
return _cache.get(key, t)
|
||||
|
||||
|
||||
class List(six.with_metaclass(ListMeta, list)):
|
||||
class List(list, metaclass=ListMeta):
|
||||
__parameters__ = ()
|
||||
|
||||
def __init__(self, *_args, **_kwargs):
|
||||
|
||||
Reference in New Issue
Block a user