mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: Fix deprecated-decorator
Pylint 2.9 introduced new checker: > The decorator is marked as deprecated and will be removed in the future. - @abstractproperty has been deprecated since Python3.3 [0] - @abstractclassmethod has been deprecated since Python3.3 [1] [0]: https://docs.python.org/3/library/abc.html#abc.abstractproperty [1]: https://docs.python.org/3/library/abc.html#abc.abstractclassmethod Fixes: https://pagure.io/freeipa/issue/9117 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Rob Crittenden
parent
516adf40f8
commit
31a9eb3783
@@ -104,7 +104,8 @@ class Resolver(abc.ABC):
|
||||
logger.info('Applying resolver state for host %s: %s', self.host, state)
|
||||
self.current_state = state
|
||||
|
||||
@abc.abstractclassmethod
|
||||
@classmethod
|
||||
@abc.abstractmethod
|
||||
def is_our_resolver(cls, host):
|
||||
"""Checks if the class is appropriate for managing resolver on the host.
|
||||
"""
|
||||
|
||||
@@ -5,7 +5,7 @@ from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
|
||||
from abc import ABCMeta, abstractproperty
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from collections import namedtuple
|
||||
import itertools
|
||||
|
||||
@@ -21,7 +21,8 @@ class InstallerTestBase(six.with_metaclass(ABCMeta, object)):
|
||||
OPTS_DICT = {}
|
||||
|
||||
# don't allow creating classes with tested_cls unspecified
|
||||
@abstractproperty
|
||||
@property
|
||||
@abstractmethod
|
||||
def tested_cls(self):
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user