Merge "Use flake8-import-order plugin"
This commit is contained in:
commit
af308ca0da
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
|
||||
import netaddr
|
||||
from neutron_lib import constants as lib_constants
|
||||
from neutron_lib.utils import helpers
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
import six
|
||||
|
||||
from neutron_lib.api import converters
|
||||
from neutron_lib.api.definitions import provider_net as providernet
|
||||
@ -22,6 +21,7 @@ from neutron_lib.api import extensions as api_extensions
|
||||
from neutron_lib import constants
|
||||
from neutron_lib.db import constants as db_const
|
||||
from neutron_lib.plugins import directory
|
||||
import six
|
||||
|
||||
from neutron.api import extensions
|
||||
from neutron.api.v2 import base
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
from neutron_lib.plugins import constants as lib_const
|
||||
from neutron_lib.plugins import directory
|
||||
from oslo_config import cfg
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
|
||||
import collections
|
||||
from operator import itemgetter
|
||||
|
||||
from neutron_lib import constants
|
||||
from operator import itemgetter
|
||||
from oslo_config import cfg
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_log import log as logging
|
||||
|
@ -13,9 +13,9 @@
|
||||
# under the License.
|
||||
#
|
||||
import functools
|
||||
import netaddr
|
||||
|
||||
import fixtures
|
||||
import netaddr
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
from neutron_lib import constants
|
||||
from neutronclient.common import exceptions
|
||||
|
@ -13,10 +13,10 @@
|
||||
# under the License.
|
||||
|
||||
import functools
|
||||
import netaddr
|
||||
import os
|
||||
import time
|
||||
|
||||
import netaddr
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from neutron.agent.l3 import ha_router
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
import copy
|
||||
import functools
|
||||
import textwrap
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
@ -23,7 +24,6 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import uuidutils
|
||||
import testtools
|
||||
import textwrap
|
||||
|
||||
from neutron.agent.common import ovs_lib
|
||||
from neutron.agent.l3 import agent as neutron_l3_agent
|
||||
|
@ -17,6 +17,7 @@
|
||||
# under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
import eventlet
|
||||
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import time
|
||||
|
||||
import mock
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import registry
|
||||
from neutron_lib.callbacks import resources
|
||||
|
@ -13,10 +13,11 @@
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
from contextlib import contextmanager
|
||||
import subprocess
|
||||
|
||||
from alembic.ddl import base as alembic_ddl
|
||||
from alembic import script as alembic_script
|
||||
from contextlib import contextmanager
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
from oslo_db.sqlalchemy import test_migrations
|
||||
@ -25,7 +26,6 @@ import six
|
||||
import sqlalchemy
|
||||
from sqlalchemy import event # noqa
|
||||
from sqlalchemy.sql import ddl as sqla_ddl
|
||||
import subprocess
|
||||
|
||||
from neutron.db.migration.alembic_migrations import external
|
||||
from neutron.db.migration import cli as migration
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import uuidutils
|
||||
|
@ -12,9 +12,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import os.path
|
||||
|
||||
import mock
|
||||
from oslo_utils import fileutils
|
||||
import psutil
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
@ -21,7 +22,6 @@ from neutron_lib import exceptions
|
||||
import pyroute2
|
||||
from pyroute2.netlink.rtnl import ndmsg
|
||||
from pyroute2 import NetlinkError
|
||||
import socket
|
||||
import testtools
|
||||
|
||||
from neutron.agent.common import utils # noqa
|
||||
|
@ -14,12 +14,11 @@
|
||||
#
|
||||
|
||||
import os
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
import textwrap
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants as n_consts
|
||||
import testtools
|
||||
|
||||
from neutron.agent.linux import keepalived
|
||||
from neutron.tests import base
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import datetime
|
||||
|
||||
import mock
|
||||
from oslo_context import context as oslo_context
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
import datetime
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import registry
|
||||
from neutron_lib.callbacks import resources
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
import copy
|
||||
import datetime
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from neutron_lib import constants
|
||||
from neutron_lib import context
|
||||
from neutron_lib import exceptions as n_exc
|
||||
|
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib import constants
|
||||
|
@ -12,6 +12,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import exceptions
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import abc
|
||||
import netaddr
|
||||
|
||||
import netaddr
|
||||
from neutron_lib import context
|
||||
from oslo_db import exception
|
||||
from oslo_db.tests.sqlalchemy import base as test_base
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
|
||||
import copy
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
|
||||
from neutron_lib import context
|
||||
from neutron_lib.db import constants as db_const
|
||||
from oslo_config import cfg
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from keystoneauth1 import exceptions as ks_exc
|
||||
|
||||
from keystoneauth1 import exceptions as ks_exc
|
||||
import mock
|
||||
import netaddr
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
|
@ -13,12 +13,12 @@
|
||||
# under the License.
|
||||
|
||||
import datetime
|
||||
import six
|
||||
|
||||
import mock
|
||||
from neutron_lib import context
|
||||
from neutron_lib.plugins import directory
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
from neutron.db import db_base_plugin_v2
|
||||
from neutron.db import models_v2
|
||||
|
@ -15,6 +15,7 @@ import re
|
||||
from flake8 import engine
|
||||
from hacking.tests import test_doctest as hacking_doctest
|
||||
import pep8
|
||||
import pkg_resources
|
||||
import testscenarios
|
||||
import testtools
|
||||
from testtools import content
|
||||
@ -288,10 +289,13 @@ def _get_lines(check):
|
||||
|
||||
def load_tests(loader, tests, pattern):
|
||||
|
||||
flake8_style = engine.get_style_guide(parse_argv=False,
|
||||
# Ignore H104 otherwise it's
|
||||
# raised on doctests.
|
||||
ignore=('F', 'H104'))
|
||||
default_checks = [e.name for e
|
||||
in pkg_resources.iter_entry_points('flake8.extension')]
|
||||
flake8_style = engine.get_style_guide(
|
||||
parse_argv=False,
|
||||
# We are testing neutron-specific hacking rules, so there is no need
|
||||
# to run the checks registered by hacking or other flake8 extensions.
|
||||
ignore=default_checks)
|
||||
options = flake8_style.options
|
||||
|
||||
for name, check in checks.__dict__.items():
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from neutron.objects import quota
|
||||
|
@ -15,6 +15,7 @@
|
||||
# under the License.
|
||||
|
||||
import hashlib
|
||||
|
||||
import mock
|
||||
|
||||
from neutron.plugins.ml2.drivers.macvtap import macvtap_common as m_common
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import contextlib
|
||||
import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from neutron.services.trunk.drivers.openvswitch.agent import trunk_manager
|
||||
|
@ -5,6 +5,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
mock>=2.0 # BSD
|
||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
sphinx!=1.6.1,>=1.5.1 # BSD
|
||||
|
Loading…
Reference in New Issue
Block a user