From 6132647fb77b83cc99406b5da9ae3c63666cb447 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 17 Jul 2014 09:05:16 +0200 Subject: [PATCH] Enabled hacking checks H305 and H307 * H305 imports not grouped correctly * H307 like imports should be grouped together Change-Id: If1dd9c89f65ede6959865a885777cb08c263eca0 --- taskflow/engines/action_engine/engine.py | 2 -- taskflow/engines/action_engine/runtime.py | 11 +++++------ taskflow/engines/worker_based/protocol.py | 3 +-- taskflow/engines/worker_based/proxy.py | 2 +- taskflow/examples/calculate_in_parallel.py | 1 - taskflow/examples/delayed_return.py | 1 - taskflow/examples/fake_billing.py | 3 +-- taskflow/examples/resume_from_backend.py | 1 - taskflow/examples/resume_many_flows/resume_all.py | 1 - taskflow/examples/resume_vm_boot.py | 9 +++------ taskflow/examples/resume_volume_create.py | 4 +--- taskflow/examples/reverting_linear.py | 1 - taskflow/examples/simple_linear_listening.py | 1 - taskflow/examples/wrapped_exception.py | 1 - .../versions/14b227d79a87_add_intention_column.py | 1 + .../versions/84d6e888850_add_task_detail_type.py | 1 + taskflow/persistence/backends/sqlalchemy/models.py | 1 - taskflow/test.py | 6 ++---- taskflow/tests/unit/jobs/base.py | 2 +- taskflow/tests/unit/jobs/test_zk_job.py | 6 ++---- taskflow/tests/unit/patterns/test_graph_flow.py | 1 - taskflow/tests/unit/patterns/test_linear_flow.py | 1 - taskflow/tests/unit/patterns/test_unordered_flow.py | 1 - .../tests/unit/persistence/test_zk_persistence.py | 3 +-- taskflow/tests/unit/test_action_engine.py | 11 ++++------- taskflow/tests/unit/test_action_engine_compile.py | 4 +--- taskflow/tests/unit/test_arguments_passing.py | 1 - taskflow/tests/unit/test_duration.py | 6 +++--- taskflow/tests/unit/test_engine_helpers.py | 3 +-- taskflow/tests/unit/test_flow_dependencies.py | 3 +-- taskflow/tests/unit/test_functor_task.py | 1 - taskflow/tests/unit/test_progress.py | 5 ++--- taskflow/tests/unit/test_retries.py | 6 ++---- taskflow/tests/unit/test_utils_async_utils.py | 3 +-- taskflow/tests/unit/test_utils_failure.py | 1 - taskflow/tests/unit/worker_based/test_executor.py | 2 +- taskflow/tests/unit/worker_based/test_protocol.py | 3 +-- taskflow/tests/unit/worker_based/test_proxy.py | 3 ++- taskflow/tests/unit/worker_based/test_server.py | 6 ++---- tox.ini | 2 +- 40 files changed, 42 insertions(+), 82 deletions(-) diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py index fefcef0f..054c2ccf 100644 --- a/taskflow/engines/action_engine/engine.py +++ b/taskflow/engines/action_engine/engine.py @@ -20,13 +20,11 @@ from taskflow.engines.action_engine import compiler from taskflow.engines.action_engine import executor from taskflow.engines.action_engine import runtime from taskflow.engines import base - from taskflow import exceptions as exc from taskflow.openstack.common import excutils from taskflow import retry from taskflow import states from taskflow import storage as atom_storage - from taskflow.utils import lock_utils from taskflow.utils import misc from taskflow.utils import reflection diff --git a/taskflow/engines/action_engine/runtime.py b/taskflow/engines/action_engine/runtime.py index 3f5e2670..90913b99 100644 --- a/taskflow/engines/action_engine/runtime.py +++ b/taskflow/engines/action_engine/runtime.py @@ -14,17 +14,16 @@ # License for the specific language governing permissions and limitations # under the License. -from taskflow import exceptions as excp -from taskflow import retry as retry_atom -from taskflow import states as st -from taskflow import task as task_atom -from taskflow.utils import misc - from taskflow.engines.action_engine import analyzer as ca from taskflow.engines.action_engine import executor as ex from taskflow.engines.action_engine import retry_action as ra from taskflow.engines.action_engine import runner as ru from taskflow.engines.action_engine import task_action as ta +from taskflow import exceptions as excp +from taskflow import retry as retry_atom +from taskflow import states as st +from taskflow import task as task_atom +from taskflow.utils import misc class Runtime(object): diff --git a/taskflow/engines/worker_based/protocol.py b/taskflow/engines/worker_based/protocol.py index d8cab533..1eb43227 100644 --- a/taskflow/engines/worker_based/protocol.py +++ b/taskflow/engines/worker_based/protocol.py @@ -16,9 +16,8 @@ import abc -import six - from concurrent import futures +import six from taskflow.engines.action_engine import executor from taskflow.types import time diff --git a/taskflow/engines/worker_based/proxy.py b/taskflow/engines/worker_based/proxy.py index 3700501e..9850b376 100644 --- a/taskflow/engines/worker_based/proxy.py +++ b/taskflow/engines/worker_based/proxy.py @@ -14,11 +14,11 @@ # License for the specific language governing permissions and limitations # under the License. -import kombu import logging import socket import threading +import kombu import six LOG = logging.getLogger(__name__) diff --git a/taskflow/examples/calculate_in_parallel.py b/taskflow/examples/calculate_in_parallel.py index f179c3ee..5b996564 100644 --- a/taskflow/examples/calculate_in_parallel.py +++ b/taskflow/examples/calculate_in_parallel.py @@ -26,7 +26,6 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) import taskflow.engines - from taskflow.patterns import linear_flow as lf from taskflow.patterns import unordered_flow as uf from taskflow import task diff --git a/taskflow/examples/delayed_return.py b/taskflow/examples/delayed_return.py index cbdc66d5..46578621 100644 --- a/taskflow/examples/delayed_return.py +++ b/taskflow/examples/delayed_return.py @@ -35,7 +35,6 @@ sys.path.insert(0, self_dir) # while the function will have returned. import taskflow.engines - from taskflow.listeners import base from taskflow.patterns import linear_flow as lf from taskflow import states diff --git a/taskflow/examples/fake_billing.py b/taskflow/examples/fake_billing.py index 16829226..566fd4b1 100644 --- a/taskflow/examples/fake_billing.py +++ b/taskflow/examples/fake_billing.py @@ -28,10 +28,9 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) -from taskflow.openstack.common import uuidutils - from taskflow import engines from taskflow.listeners import printing +from taskflow.openstack.common import uuidutils from taskflow.patterns import graph_flow as gf from taskflow.patterns import linear_flow as lf from taskflow import task diff --git a/taskflow/examples/resume_from_backend.py b/taskflow/examples/resume_from_backend.py index ef20a160..2a6e0955 100644 --- a/taskflow/examples/resume_from_backend.py +++ b/taskflow/examples/resume_from_backend.py @@ -28,7 +28,6 @@ sys.path.insert(0, top_dir) sys.path.insert(0, self_dir) import taskflow.engines - from taskflow.patterns import linear_flow as lf from taskflow import task from taskflow.utils import persistence_utils as p_utils diff --git a/taskflow/examples/resume_many_flows/resume_all.py b/taskflow/examples/resume_many_flows/resume_all.py index 8be5f6d0..071fb616 100644 --- a/taskflow/examples/resume_many_flows/resume_all.py +++ b/taskflow/examples/resume_many_flows/resume_all.py @@ -30,7 +30,6 @@ sys.path.insert(0, example_dir) import taskflow.engines - from taskflow import states import example_utils # noqa diff --git a/taskflow/examples/resume_vm_boot.py b/taskflow/examples/resume_vm_boot.py index 90756f18..973089ab 100644 --- a/taskflow/examples/resume_vm_boot.py +++ b/taskflow/examples/resume_vm_boot.py @@ -31,15 +31,12 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) sys.path.insert(0, self_dir) -from taskflow.patterns import graph_flow as gf -from taskflow.patterns import linear_flow as lf - -from taskflow.openstack.common import uuidutils - from taskflow import engines from taskflow import exceptions as exc +from taskflow.openstack.common import uuidutils +from taskflow.patterns import graph_flow as gf +from taskflow.patterns import linear_flow as lf from taskflow import task - from taskflow.utils import eventlet_utils as e_utils from taskflow.utils import persistence_utils as p_utils diff --git a/taskflow/examples/resume_volume_create.py b/taskflow/examples/resume_volume_create.py index f6f90bbc..0fe502e4 100644 --- a/taskflow/examples/resume_volume_create.py +++ b/taskflow/examples/resume_volume_create.py @@ -31,12 +31,10 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) sys.path.insert(0, self_dir) +from taskflow import engines from taskflow.patterns import graph_flow as gf from taskflow.patterns import linear_flow as lf - -from taskflow import engines from taskflow import task - from taskflow.utils import persistence_utils as p_utils import example_utils # noqa diff --git a/taskflow/examples/reverting_linear.py b/taskflow/examples/reverting_linear.py index e6e5bb04..99e7b5df 100644 --- a/taskflow/examples/reverting_linear.py +++ b/taskflow/examples/reverting_linear.py @@ -26,7 +26,6 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) import taskflow.engines - from taskflow.patterns import linear_flow as lf from taskflow import task diff --git a/taskflow/examples/simple_linear_listening.py b/taskflow/examples/simple_linear_listening.py index 358f0ff2..04f9f14e 100644 --- a/taskflow/examples/simple_linear_listening.py +++ b/taskflow/examples/simple_linear_listening.py @@ -26,7 +26,6 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) import taskflow.engines - from taskflow.patterns import linear_flow as lf from taskflow import task diff --git a/taskflow/examples/wrapped_exception.py b/taskflow/examples/wrapped_exception.py index 17ae6322..3d3a7379 100644 --- a/taskflow/examples/wrapped_exception.py +++ b/taskflow/examples/wrapped_exception.py @@ -29,7 +29,6 @@ sys.path.insert(0, top_dir) import taskflow.engines - from taskflow import exceptions from taskflow.patterns import unordered_flow as uf from taskflow import task diff --git a/taskflow/persistence/backends/sqlalchemy/alembic/versions/14b227d79a87_add_intention_column.py b/taskflow/persistence/backends/sqlalchemy/alembic/versions/14b227d79a87_add_intention_column.py index b7bfe8d8..33541d0e 100644 --- a/taskflow/persistence/backends/sqlalchemy/alembic/versions/14b227d79a87_add_intention_column.py +++ b/taskflow/persistence/backends/sqlalchemy/alembic/versions/14b227d79a87_add_intention_column.py @@ -20,6 +20,7 @@ down_revision = '84d6e888850' from alembic import op import sqlalchemy as sa + from taskflow import states diff --git a/taskflow/persistence/backends/sqlalchemy/alembic/versions/84d6e888850_add_task_detail_type.py b/taskflow/persistence/backends/sqlalchemy/alembic/versions/84d6e888850_add_task_detail_type.py index d03b6528..756cf93a 100644 --- a/taskflow/persistence/backends/sqlalchemy/alembic/versions/84d6e888850_add_task_detail_type.py +++ b/taskflow/persistence/backends/sqlalchemy/alembic/versions/84d6e888850_add_task_detail_type.py @@ -28,6 +28,7 @@ down_revision = '1c783c0c2875' from alembic import op import sqlalchemy as sa + from taskflow.persistence import logbook diff --git a/taskflow/persistence/backends/sqlalchemy/models.py b/taskflow/persistence/backends/sqlalchemy/models.py index cad86628..4a78c5cb 100644 --- a/taskflow/persistence/backends/sqlalchemy/models.py +++ b/taskflow/persistence/backends/sqlalchemy/models.py @@ -25,7 +25,6 @@ from sqlalchemy import types as types from taskflow.openstack.common import jsonutils from taskflow.openstack.common import timeutils from taskflow.openstack.common import uuidutils - from taskflow.persistence import logbook from taskflow import states diff --git a/taskflow/test.py b/taskflow/test.py index aa2ffd42..4de61d3e 100644 --- a/taskflow/test.py +++ b/taskflow/test.py @@ -14,15 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. +import fixtures import mock - +import six from testtools import compat from testtools import matchers from testtools import testcase -import fixtures -import six - from taskflow import exceptions from taskflow.tests import utils from taskflow.utils import misc diff --git a/taskflow/tests/unit/jobs/base.py b/taskflow/tests/unit/jobs/base.py index c75f424c..a178a8af 100644 --- a/taskflow/tests/unit/jobs/base.py +++ b/taskflow/tests/unit/jobs/base.py @@ -15,11 +15,11 @@ # under the License. import contextlib -import mock import threading import time from kazoo.recipe import watchers +import mock from taskflow import exceptions as excp from taskflow.openstack.common import uuidutils diff --git a/taskflow/tests/unit/jobs/test_zk_job.py b/taskflow/tests/unit/jobs/test_zk_job.py index 3d5f8228..7268a1a4 100644 --- a/taskflow/tests/unit/jobs/test_zk_job.py +++ b/taskflow/tests/unit/jobs/test_zk_job.py @@ -16,16 +16,14 @@ import six import testtools - from zake import fake_client from zake import utils as zake_utils from taskflow.jobs.backends import impl_zookeeper -from taskflow import states -from taskflow import test - from taskflow.openstack.common import jsonutils from taskflow.openstack.common import uuidutils +from taskflow import states +from taskflow import test from taskflow.tests.unit.jobs import base from taskflow.tests import utils as test_utils from taskflow.utils import kazoo_utils diff --git a/taskflow/tests/unit/patterns/test_graph_flow.py b/taskflow/tests/unit/patterns/test_graph_flow.py index 2a95ad2d..c7dad38e 100644 --- a/taskflow/tests/unit/patterns/test_graph_flow.py +++ b/taskflow/tests/unit/patterns/test_graph_flow.py @@ -17,7 +17,6 @@ from taskflow import exceptions as exc from taskflow.patterns import graph_flow as gf from taskflow import retry - from taskflow import test from taskflow.tests import utils diff --git a/taskflow/tests/unit/patterns/test_linear_flow.py b/taskflow/tests/unit/patterns/test_linear_flow.py index 7ff88860..a0dbd0d7 100644 --- a/taskflow/tests/unit/patterns/test_linear_flow.py +++ b/taskflow/tests/unit/patterns/test_linear_flow.py @@ -17,7 +17,6 @@ from taskflow import exceptions as exc from taskflow.patterns import linear_flow as lf from taskflow import retry - from taskflow import test from taskflow.tests import utils diff --git a/taskflow/tests/unit/patterns/test_unordered_flow.py b/taskflow/tests/unit/patterns/test_unordered_flow.py index 4759f8d2..a4043fe2 100644 --- a/taskflow/tests/unit/patterns/test_unordered_flow.py +++ b/taskflow/tests/unit/patterns/test_unordered_flow.py @@ -17,7 +17,6 @@ from taskflow import exceptions as exc from taskflow.patterns import unordered_flow as uf from taskflow import retry - from taskflow import test from taskflow.tests import utils diff --git a/taskflow/tests/unit/persistence/test_zk_persistence.py b/taskflow/tests/unit/persistence/test_zk_persistence.py index 354c2a71..609de21f 100644 --- a/taskflow/tests/unit/persistence/test_zk_persistence.py +++ b/taskflow/tests/unit/persistence/test_zk_persistence.py @@ -25,10 +25,9 @@ from taskflow.openstack.common import uuidutils from taskflow.persistence import backends from taskflow.persistence.backends import impl_zookeeper from taskflow import test -from taskflow.utils import kazoo_utils - from taskflow.tests.unit.persistence import base from taskflow.tests import utils as test_utils +from taskflow.utils import kazoo_utils TEST_PATH_TPL = '/taskflow/persistence-test/%s' _ZOOKEEPER_AVAILABLE = test_utils.zookeeper_available( diff --git a/taskflow/tests/unit/test_action_engine.py b/taskflow/tests/unit/test_action_engine.py index 533b5eef..d2fb0d43 100644 --- a/taskflow/tests/unit/test_action_engine.py +++ b/taskflow/tests/unit/test_action_engine.py @@ -15,28 +15,25 @@ # under the License. import contextlib -import testtools import threading from concurrent import futures - -from taskflow.patterns import graph_flow as gf -from taskflow.patterns import linear_flow as lf -from taskflow.patterns import unordered_flow as uf +import testtools import taskflow.engines - from taskflow.engines.action_engine import engine as eng from taskflow.engines.worker_based import engine as w_eng from taskflow.engines.worker_based import worker as wkr from taskflow import exceptions as exc +from taskflow.patterns import graph_flow as gf +from taskflow.patterns import linear_flow as lf +from taskflow.patterns import unordered_flow as uf from taskflow.persistence import logbook from taskflow import states from taskflow import task from taskflow import test from taskflow.tests import utils from taskflow.types import graph as gr - from taskflow.utils import eventlet_utils as eu from taskflow.utils import misc from taskflow.utils import persistence_utils as p_utils diff --git a/taskflow/tests/unit/test_action_engine_compile.py b/taskflow/tests/unit/test_action_engine_compile.py index 82075b04..ef268d9d 100644 --- a/taskflow/tests/unit/test_action_engine_compile.py +++ b/taskflow/tests/unit/test_action_engine_compile.py @@ -16,17 +16,15 @@ import string +from taskflow.engines.action_engine import compiler from taskflow import exceptions as exc from taskflow.patterns import graph_flow as gf from taskflow.patterns import linear_flow as lf from taskflow.patterns import unordered_flow as uf from taskflow import retry - from taskflow import test from taskflow.tests import utils as t_utils -from taskflow.engines.action_engine import compiler - def _make_many(amount): assert amount <= len(string.ascii_lowercase), 'Not enough letters' diff --git a/taskflow/tests/unit/test_arguments_passing.py b/taskflow/tests/unit/test_arguments_passing.py index 0281c1ff..5e9fc3a8 100644 --- a/taskflow/tests/unit/test_arguments_passing.py +++ b/taskflow/tests/unit/test_arguments_passing.py @@ -15,7 +15,6 @@ # under the License. import taskflow.engines - from taskflow import exceptions as exc from taskflow import test from taskflow.tests import utils diff --git a/taskflow/tests/unit/test_duration.py b/taskflow/tests/unit/test_duration.py index 67d240cb..e1588eb2 100644 --- a/taskflow/tests/unit/test_duration.py +++ b/taskflow/tests/unit/test_duration.py @@ -15,17 +15,17 @@ # under the License. import contextlib -import mock import time -from taskflow import task -from taskflow import test +import mock import taskflow.engines from taskflow import exceptions as exc from taskflow.listeners import timing from taskflow.patterns import linear_flow as lf from taskflow.persistence.backends import impl_memory +from taskflow import task +from taskflow import test from taskflow.tests import utils as t_utils from taskflow.utils import persistence_utils as p_utils diff --git a/taskflow/tests/unit/test_engine_helpers.py b/taskflow/tests/unit/test_engine_helpers.py index da0a276b..30ff51c3 100644 --- a/taskflow/tests/unit/test_engine_helpers.py +++ b/taskflow/tests/unit/test_engine_helpers.py @@ -16,14 +16,13 @@ import mock +import taskflow.engines from taskflow import exceptions as exc from taskflow.patterns import linear_flow from taskflow import test from taskflow.tests import utils as test_utils from taskflow.utils import persistence_utils as p_utils -import taskflow.engines - class EngineLoadingTestCase(test.TestCase): def test_default_load(self): diff --git a/taskflow/tests/unit/test_flow_dependencies.py b/taskflow/tests/unit/test_flow_dependencies.py index 7700499d..3ddb95d9 100644 --- a/taskflow/tests/unit/test_flow_dependencies.py +++ b/taskflow/tests/unit/test_flow_dependencies.py @@ -14,11 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. +from taskflow import exceptions from taskflow.patterns import graph_flow as gf from taskflow.patterns import linear_flow as lf from taskflow.patterns import unordered_flow as uf - -from taskflow import exceptions from taskflow import retry from taskflow import test from taskflow.tests import utils diff --git a/taskflow/tests/unit/test_functor_task.py b/taskflow/tests/unit/test_functor_task.py index 53db4c96..676c2c8b 100644 --- a/taskflow/tests/unit/test_functor_task.py +++ b/taskflow/tests/unit/test_functor_task.py @@ -15,7 +15,6 @@ # under the License. import taskflow.engines - from taskflow.patterns import linear_flow from taskflow import task as base from taskflow import test diff --git a/taskflow/tests/unit/test_progress.py b/taskflow/tests/unit/test_progress.py index f1fa15d3..f37d1132 100644 --- a/taskflow/tests/unit/test_progress.py +++ b/taskflow/tests/unit/test_progress.py @@ -16,12 +16,11 @@ import contextlib -from taskflow import task -from taskflow import test - import taskflow.engines from taskflow.patterns import linear_flow as lf from taskflow.persistence.backends import impl_memory +from taskflow import task +from taskflow import test from taskflow.utils import persistence_utils as p_utils diff --git a/taskflow/tests/unit/test_retries.py b/taskflow/tests/unit/test_retries.py index 6953b376..71ea70cb 100644 --- a/taskflow/tests/unit/test_retries.py +++ b/taskflow/tests/unit/test_retries.py @@ -14,13 +14,11 @@ # License for the specific language governing permissions and limitations # under the License. +import taskflow.engines +from taskflow import exceptions as exc from taskflow.patterns import graph_flow as gf from taskflow.patterns import linear_flow as lf from taskflow.patterns import unordered_flow as uf - -import taskflow.engines - -from taskflow import exceptions as exc from taskflow import retry from taskflow import states as st from taskflow import test diff --git a/taskflow/tests/unit/test_utils_async_utils.py b/taskflow/tests/unit/test_utils_async_utils.py index 8e9ab944..0abf4107 100644 --- a/taskflow/tests/unit/test_utils_async_utils.py +++ b/taskflow/tests/unit/test_utils_async_utils.py @@ -14,9 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -import testtools - from concurrent import futures +import testtools from taskflow import test from taskflow.utils import async_utils as au diff --git a/taskflow/tests/unit/test_utils_failure.py b/taskflow/tests/unit/test_utils_failure.py index 394abfd2..012e241a 100644 --- a/taskflow/tests/unit/test_utils_failure.py +++ b/taskflow/tests/unit/test_utils_failure.py @@ -19,7 +19,6 @@ import six from taskflow import exceptions from taskflow import test from taskflow.tests import utils as test_utils - from taskflow.utils import misc diff --git a/taskflow/tests/unit/worker_based/test_executor.py b/taskflow/tests/unit/worker_based/test_executor.py index 7faee1b7..36e6c0b7 100644 --- a/taskflow/tests/unit/worker_based/test_executor.py +++ b/taskflow/tests/unit/worker_based/test_executor.py @@ -14,12 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. -import mock import threading import time from concurrent import futures from kombu import exceptions as kombu_exc +import mock from taskflow.engines.worker_based import executor from taskflow.engines.worker_based import protocol as pr diff --git a/taskflow/tests/unit/worker_based/test_protocol.py b/taskflow/tests/unit/worker_based/test_protocol.py index 27d6e00d..af7e6490 100644 --- a/taskflow/tests/unit/worker_based/test_protocol.py +++ b/taskflow/tests/unit/worker_based/test_protocol.py @@ -14,9 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock - from concurrent import futures +import mock from taskflow.engines.worker_based import protocol as pr from taskflow import test diff --git a/taskflow/tests/unit/worker_based/test_proxy.py b/taskflow/tests/unit/worker_based/test_proxy.py index 8876c23c..2cbdc25a 100644 --- a/taskflow/tests/unit/worker_based/test_proxy.py +++ b/taskflow/tests/unit/worker_based/test_proxy.py @@ -14,10 +14,11 @@ # License for the specific language governing permissions and limitations # under the License. -import mock import socket import threading +import mock + from taskflow.engines.worker_based import proxy from taskflow import test diff --git a/taskflow/tests/unit/worker_based/test_server.py b/taskflow/tests/unit/worker_based/test_server.py index a4eab7a8..2a5ed9f1 100644 --- a/taskflow/tests/unit/worker_based/test_server.py +++ b/taskflow/tests/unit/worker_based/test_server.py @@ -14,11 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. -import mock - -import six - from kombu import exceptions as exc +import mock +import six from taskflow.engines.worker_based import endpoint as ep from taskflow.engines.worker_based import protocol as pr diff --git a/tox.ini b/tox.ini index 82ba2343..29b000e6 100644 --- a/tox.ini +++ b/tox.ini @@ -68,7 +68,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}' commands = {posargs} [flake8] -ignore = H307,H305,H904 +ignore = H904 builtins = _ exclude = .venv,.tox,dist,doc,./taskflow/openstack/common,*egg,.git,build,tools