Merge "Remove usage of six.add_metaclass"

This commit is contained in:
Zuul 2020-09-21 17:58:26 +00:00 committed by Gerrit Code Review
commit 05071c9d9b
10 changed files with 12 additions and 32 deletions

View File

@ -15,7 +15,6 @@
import abc
from oslo_config import cfg
import six
from stevedore import driver
from mistral import exceptions as exc
@ -41,8 +40,7 @@ def get_auth_handler():
return _IMPL_AUTH_HANDLER
@six.add_metaclass(abc.ABCMeta)
class AuthHandler(object):
class AuthHandler(object, metaclass=abc.ABCMeta):
"""Abstract base class for an authentication plugin."""
@abc.abstractmethod

View File

@ -18,7 +18,6 @@ import abc
from oslo_config import cfg
from oslo_log import log as logging
from osprofiler import profiler
import six
from mistral.db.v2 import api as db_api
from mistral.engine import post_tx_queue
@ -41,8 +40,7 @@ LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@six.add_metaclass(abc.ABCMeta)
class Action(object):
class Action(object, metaclass=abc.ABCMeta):
"""Action.
Represents a workflow action and defines interface that can be used by

View File

@ -17,7 +17,6 @@
import abc
import jsonschema
import six
from mistral import exceptions as exc
from mistral import utils
@ -25,8 +24,7 @@ from mistral import utils
from mistral_lib.utils import inspect_utils
@six.add_metaclass(abc.ABCMeta)
class Engine(object):
class Engine(object, metaclass=abc.ABCMeta):
"""Engine interface."""
@abc.abstractmethod
@ -145,8 +143,7 @@ class Engine(object):
raise NotImplementedError
@six.add_metaclass(abc.ABCMeta)
class TaskPolicy(object):
class TaskPolicy(object, metaclass=abc.ABCMeta):
"""Task policy.
Provides interface to perform any work after a task has completed.

View File

@ -44,8 +44,7 @@ from mistral_lib import utils
LOG = logging.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)
class Task(object):
class Task(object, metaclass=abc.ABCMeta):
"""Task.
Represents a workflow task and defines interface that can be used by

View File

@ -47,8 +47,7 @@ from mistral_lib import utils
LOG = logging.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)
class Workflow(object):
class Workflow(object, metaclass=abc.ABCMeta):
"""Workflow.
Represents a workflow and defines interface that can be used by

View File

@ -14,11 +14,9 @@
# limitations under the License.
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class EventEngine(object):
class EventEngine(object, metaclass=abc.ABCMeta):
"""Action event trigger interface."""
@abc.abstractmethod

View File

@ -13,7 +13,6 @@
# limitations under the License.
import abc
import six
from stevedore import driver
@ -40,8 +39,7 @@ def get_executor(exec_type):
return _EXECUTORS[exec_type]
@six.add_metaclass(abc.ABCMeta)
class Executor(object):
class Executor(object, metaclass=abc.ABCMeta):
"""Action executor interface."""
@abc.abstractmethod

View File

@ -27,7 +27,6 @@ from oslo_messaging.notify import listener
from oslo_messaging import target
from oslo_messaging import transport
from oslo_utils import timeutils
import six
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
@ -68,8 +67,7 @@ def handle_event(self, ctxt, publisher_id, event_type, payload, metadata):
return dispatcher.NotificationResult.HANDLED
@six.add_metaclass(abc.ABCMeta)
class NotificationEndpoint(object):
class NotificationEndpoint(object, metaclass=abc.ABCMeta):
"""Message listener endpoint.
Only handle notifications that match the NotificationFilter rule set into

View File

@ -13,7 +13,6 @@
# limitations under the License.
import abc
import six
from oslo_log import log as logging
from stevedore import driver
@ -63,8 +62,7 @@ def get_notification_publisher(publisher_name):
return _NOTIFICATION_PUBLISHERS[publisher_name]
@six.add_metaclass(abc.ABCMeta)
class Notifier(object):
class Notifier(object, metaclass=abc.ABCMeta):
"""Notifier interface."""
@abc.abstractmethod
@ -72,8 +70,7 @@ class Notifier(object):
raise NotImplementedError()
@six.add_metaclass(abc.ABCMeta)
class NotificationPublisher(object):
class NotificationPublisher(object, metaclass=abc.ABCMeta):
"""Notifier plugin interface."""
@abc.abstractmethod

View File

@ -13,7 +13,6 @@
# limitations under the License.
import abc
import six
from oslo_config import cfg
from stevedore import driver
@ -26,8 +25,7 @@ _SCHEDULER_IMPL = None
_SCHEDULER = None
@six.add_metaclass(abc.ABCMeta)
class Scheduler(object):
class Scheduler(object, metaclass=abc.ABCMeta):
"""Scheduler interface.
Responsible for scheduling jobs to be executed at some point in future.