diff --git a/oslo/messaging/_cmd/zmq_receiver.py b/oslo/messaging/_cmd/zmq_receiver.py index ae0713d2e..2521ae495 100644 --- a/oslo/messaging/_cmd/zmq_receiver.py +++ b/oslo/messaging/_cmd/zmq_receiver.py @@ -22,7 +22,6 @@ import logging import sys from oslo.config import cfg - from oslo.messaging._drivers import impl_zmq from oslo.messaging._executors import impl_eventlet # FIXME(markmc) diff --git a/oslo/messaging/_drivers/amqp.py b/oslo/messaging/_drivers/amqp.py index 59fec2b3e..f008379f7 100644 --- a/oslo/messaging/_drivers/amqp.py +++ b/oslo/messaging/_drivers/amqp.py @@ -28,9 +28,9 @@ import logging import threading import uuid -from oslo.config import cfg import six +from oslo.config import cfg from oslo.messaging._drivers import common as rpc_common from oslo.messaging._drivers import pool diff --git a/oslo/messaging/_drivers/common.py b/oslo/messaging/_drivers/common.py index dd2f4baee..83f634b47 100644 --- a/oslo/messaging/_drivers/common.py +++ b/oslo/messaging/_drivers/common.py @@ -20,9 +20,9 @@ import logging import sys import traceback -from oslo import messaging import six +from oslo import messaging from oslo.messaging import _utils as utils from oslo.messaging.openstack.common import importutils from oslo.messaging.openstack.common import jsonutils diff --git a/oslo/messaging/_drivers/impl_qpid.py b/oslo/messaging/_drivers/impl_qpid.py index a7e231f63..f79fae6a7 100644 --- a/oslo/messaging/_drivers/impl_qpid.py +++ b/oslo/messaging/_drivers/impl_qpid.py @@ -19,9 +19,9 @@ import logging import random import time -from oslo.config import cfg import six +from oslo.config import cfg from oslo.messaging._drivers import amqp as rpc_amqp from oslo.messaging._drivers import amqpdriver from oslo.messaging._drivers import common as rpc_common diff --git a/oslo/messaging/_drivers/impl_rabbit.py b/oslo/messaging/_drivers/impl_rabbit.py index 84f7cbfb6..2d43e43d7 100644 --- a/oslo/messaging/_drivers/impl_rabbit.py +++ b/oslo/messaging/_drivers/impl_rabbit.py @@ -25,9 +25,9 @@ import kombu import kombu.connection import kombu.entity import kombu.messaging -from oslo.config import cfg import six +from oslo.config import cfg from oslo.messaging._drivers import amqp as rpc_amqp from oslo.messaging._drivers import amqpdriver from oslo.messaging._drivers import common as rpc_common diff --git a/oslo/messaging/_drivers/impl_zmq.py b/oslo/messaging/_drivers/impl_zmq.py index 84830f323..77975a352 100644 --- a/oslo/messaging/_drivers/impl_zmq.py +++ b/oslo/messaging/_drivers/impl_zmq.py @@ -25,10 +25,10 @@ import uuid import eventlet import greenlet -from oslo.config import cfg import six from six import moves +from oslo.config import cfg from oslo.messaging._drivers import base from oslo.messaging._drivers import common as rpc_common from oslo.messaging._executors import impl_eventlet # FIXME(markmc) diff --git a/oslo/messaging/_drivers/matchmaker.py b/oslo/messaging/_drivers/matchmaker.py index 5ebf56614..7aa7956b4 100644 --- a/oslo/messaging/_drivers/matchmaker.py +++ b/oslo/messaging/_drivers/matchmaker.py @@ -20,6 +20,7 @@ import contextlib import logging import eventlet + from oslo.config import cfg # FIXME(markmc): remove this diff --git a/oslo/messaging/_drivers/matchmaker_redis.py b/oslo/messaging/_drivers/matchmaker_redis.py index d48955714..812c87c62 100644 --- a/oslo/messaging/_drivers/matchmaker_redis.py +++ b/oslo/messaging/_drivers/matchmaker_redis.py @@ -17,7 +17,6 @@ return keys for direct exchanges, per (approximate) AMQP parlance. """ from oslo.config import cfg - from oslo.messaging._drivers import matchmaker as mm_common from oslo.messaging.openstack.common import importutils diff --git a/oslo/messaging/_drivers/matchmaker_ring.py b/oslo/messaging/_drivers/matchmaker_ring.py index e3c02b059..40db24b77 100644 --- a/oslo/messaging/_drivers/matchmaker_ring.py +++ b/oslo/messaging/_drivers/matchmaker_ring.py @@ -21,7 +21,6 @@ import json import logging from oslo.config import cfg - from oslo.messaging._drivers import matchmaker as mm # FIXME(markmc): remove this diff --git a/oslo/messaging/_executors/impl_eventlet.py b/oslo/messaging/_executors/impl_eventlet.py index fb70dff49..6281dd951 100644 --- a/oslo/messaging/_executors/impl_eventlet.py +++ b/oslo/messaging/_executors/impl_eventlet.py @@ -20,7 +20,6 @@ from eventlet import greenpool import greenlet from oslo.config import cfg - from oslo.messaging._executors import base from oslo.messaging.openstack.common import excutils diff --git a/oslo/messaging/notify/_impl_routing.py b/oslo/messaging/notify/_impl_routing.py index efb12564d..50d14ee5f 100644 --- a/oslo/messaging/notify/_impl_routing.py +++ b/oslo/messaging/notify/_impl_routing.py @@ -16,11 +16,11 @@ import fnmatch import logging -from oslo.config import cfg import six from stevedore import dispatch import yaml +from oslo.config import cfg from oslo.messaging.notify import notifier from oslo.messaging.openstack.common.gettextutils import _ # noqa diff --git a/oslo/messaging/notify/logger.py b/oslo/messaging/notify/logger.py index 0f794a69f..b1e1e771c 100644 --- a/oslo/messaging/notify/logger.py +++ b/oslo/messaging/notify/logger.py @@ -17,7 +17,6 @@ Driver for the Python logging package that sends log records as a notification. import logging from oslo.config import cfg - from oslo.messaging.notify import notifier from oslo.messaging import transport diff --git a/oslo/messaging/notify/notifier.py b/oslo/messaging/notify/notifier.py index e15a8008e..3c2152e5c 100644 --- a/oslo/messaging/notify/notifier.py +++ b/oslo/messaging/notify/notifier.py @@ -19,10 +19,10 @@ import abc import logging import uuid -from oslo.config import cfg import six from stevedore import named +from oslo.config import cfg from oslo.messaging.openstack.common import timeutils from oslo.messaging import serializer as msg_serializer diff --git a/oslo/messaging/rpc/client.py b/oslo/messaging/rpc/client.py index a140ffe2d..af34c6b97 100644 --- a/oslo/messaging/rpc/client.py +++ b/oslo/messaging/rpc/client.py @@ -23,9 +23,9 @@ __all__ = [ 'RemoteError', ] -from oslo.config import cfg import six +from oslo.config import cfg from oslo.messaging._drivers import base as driver_base from oslo.messaging import _utils as utils from oslo.messaging import exceptions diff --git a/oslo/messaging/transport.py b/oslo/messaging/transport.py index e1a421064..9c9844b06 100644 --- a/oslo/messaging/transport.py +++ b/oslo/messaging/transport.py @@ -27,11 +27,11 @@ __all__ = [ 'set_transport_defaults', ] -from oslo.config import cfg import six from six.moves.urllib import parse from stevedore import driver +from oslo.config import cfg from oslo.messaging import exceptions diff --git a/tests/executors/test_executor.py b/tests/executors/test_executor.py index 26f642e27..31b2e374f 100644 --- a/tests/executors/test_executor.py +++ b/tests/executors/test_executor.py @@ -15,9 +15,9 @@ # under the License. import contextlib -import eventlet import threading +import eventlet import mock import testscenarios diff --git a/tests/notify/test_listener.py b/tests/notify/test_listener.py index 8f0c30918..2186d47a0 100644 --- a/tests/notify/test_listener.py +++ b/tests/notify/test_listener.py @@ -16,9 +16,9 @@ import threading import mock -from oslo.config import cfg import testscenarios +from oslo.config import cfg from oslo import messaging from oslo.messaging.notify import dispatcher from tests import utils as test_utils diff --git a/tests/notify/test_log_handler.py b/tests/notify/test_log_handler.py index 8e5d55f18..f17a28772 100644 --- a/tests/notify/test_log_handler.py +++ b/tests/notify/test_log_handler.py @@ -11,6 +11,7 @@ # under the License. import logging + import mock from oslo import messaging diff --git a/tests/rpc/test_client.py b/tests/rpc/test_client.py index 0735f86c4..b7e1cff5f 100644 --- a/tests/rpc/test_client.py +++ b/tests/rpc/test_client.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.config import cfg import testscenarios +from oslo.config import cfg from oslo import messaging from oslo.messaging import serializer as msg_serializer from tests import utils as test_utils diff --git a/tests/rpc/test_server.py b/tests/rpc/test_server.py index f4f5120c5..4c1396ab1 100644 --- a/tests/rpc/test_server.py +++ b/tests/rpc/test_server.py @@ -15,9 +15,9 @@ import threading -from oslo.config import cfg import testscenarios +from oslo.config import cfg from oslo import messaging from tests import utils as test_utils diff --git a/tests/test_expected_exceptions.py b/tests/test_expected_exceptions.py index 8ec94a149..fe29ec063 100644 --- a/tests/test_expected_exceptions.py +++ b/tests/test_expected_exceptions.py @@ -15,7 +15,6 @@ # under the License. from oslo import messaging - from tests import utils as test_utils diff --git a/tests/test_transport.py b/tests/test_transport.py index ba14b0281..34a72e5b0 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -15,11 +15,11 @@ import fixtures from mox3 import mox -from oslo.config import cfg import six from stevedore import driver import testscenarios +from oslo.config import cfg from oslo import messaging from oslo.messaging import transport from tests import utils as test_utils diff --git a/tests/utils.py b/tests/utils.py index af8ad748f..7074ff29e 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -19,9 +19,10 @@ """Common utilities used in testing""" -from oslo.config import cfg import six +from oslo.config import cfg + from oslotest import base from oslotest import moxstubout diff --git a/tox.ini b/tox.ini index d40305249..40bb4383a 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ commands = python setup.py build_sphinx [flake8] show-source = True -ignore = E226,E241,E265,E714,H237,H305,H307,H402,H405,H904 +ignore = E226,E241,E265,E714,H237,H402,H405,H904 exclude = .tox,dist,doc,*.egg,build,__init__.py builtins = _