Use flake8-import-order plugin

Automate the process

Change-Id: Ic2ff59ed8b5e4677117a5fca5ab32c26b2401724
This commit is contained in:
Gary Kotton 2017-07-05 05:28:12 -07:00 committed by garyk
parent accc24cc6c
commit 6a4916e313
7 changed files with 29 additions and 27 deletions

View File

@ -14,6 +14,7 @@
# under the License. # under the License.
import gettext import gettext
import six import six

View File

@ -13,21 +13,9 @@
# under the License. # under the License.
import itertools import itertools
import netaddr import netaddr
from oslo_db import exception as oslo_db_exc
from oslo_utils import uuidutils
import sqlalchemy as sa
from sqlalchemy import and_
from sqlalchemy import orm
from sqlalchemy.orm import aliased
from sqlalchemy.orm import exc as sa_exc
from neutron_lib.api import validators
from neutron_lib import constants as lib_consts
from neutron_lib.db import model_base
from neutron_lib import exceptions as n_exc
from neutron.db import api as db_api from neutron.db import api as db_api
from neutron.db import common_db_mixin as common_db from neutron.db import common_db_mixin as common_db
from neutron.db import l3_dvr_db from neutron.db import l3_dvr_db
@ -38,6 +26,18 @@ from neutron.db import models_v2
from neutron.extensions import l3 as l3_ext from neutron.extensions import l3 as l3_ext
from neutron.plugins.ml2 import models as ml2_models from neutron.plugins.ml2 import models as ml2_models
from neutron_lib.api import validators
from neutron_lib import constants as lib_consts
from neutron_lib.db import model_base
from neutron_lib import exceptions as n_exc
from oslo_db import exception as oslo_db_exc
from oslo_utils import uuidutils
import sqlalchemy as sa
from sqlalchemy import and_
from sqlalchemy import orm
from sqlalchemy.orm import aliased
from sqlalchemy.orm import exc as sa_exc
from neutron_dynamic_routing._i18n import _ from neutron_dynamic_routing._i18n import _
from neutron_dynamic_routing.extensions import bgp as bgp_ext from neutron_dynamic_routing.extensions import bgp as bgp_ext

View File

@ -14,19 +14,18 @@
# under the License. # under the License.
import abc import abc
import six
import webob
from neutron_lib.api import extensions as api_extensions
from neutron_lib import exceptions as n_exc
from neutron_lib.plugins import directory
from oslo_log import log as logging
from neutron.api import extensions from neutron.api import extensions
from neutron.api.v2 import base from neutron.api.v2 import base
from neutron.api.v2 import resource from neutron.api.v2 import resource
from neutron.extensions import agent from neutron.extensions import agent
from neutron import wsgi from neutron import wsgi
from neutron_lib.api import extensions as api_extensions
from neutron_lib import exceptions as n_exc
from neutron_lib.plugins import directory
from oslo_log import log as logging
import six
import webob
from neutron_dynamic_routing._i18n import _, _LE from neutron_dynamic_routing._i18n import _, _LE
from neutron_dynamic_routing.extensions import bgp as bgp_ext from neutron_dynamic_routing.extensions import bgp as bgp_ext

View File

@ -14,6 +14,7 @@
# limitations under the License. # limitations under the License.
import abc import abc
import six import six

View File

@ -13,22 +13,21 @@
# under the License. # under the License.
import contextlib import contextlib
import mock import mock
import netaddr import netaddr
from oslo_config import cfg from neutron.db import l3_dvr_ha_scheduler_db
from neutron.extensions import external_net
from neutron.tests.unit.extensions import test_l3
from neutron.tests.unit.plugins.ml2 import test_plugin
from neutron_lib.api.definitions import portbindings from neutron_lib.api.definitions import portbindings
from neutron_lib import constants as n_const from neutron_lib import constants as n_const
from neutron_lib import exceptions as n_exc from neutron_lib import exceptions as n_exc
from neutron_lib.plugins import constants as plugin_constants from neutron_lib.plugins import constants as plugin_constants
from neutron_lib.plugins import directory from neutron_lib.plugins import directory
from oslo_config import cfg
from oslo_utils import uuidutils from oslo_utils import uuidutils
from neutron.db import l3_dvr_ha_scheduler_db
from neutron.extensions import external_net
from neutron.tests.unit.extensions import test_l3
from neutron.tests.unit.plugins.ml2 import test_plugin
from neutron_dynamic_routing.extensions import bgp from neutron_dynamic_routing.extensions import bgp
from neutron_dynamic_routing.services.bgp import bgp_plugin from neutron_dynamic_routing.services.bgp import bgp_plugin

View File

@ -5,6 +5,7 @@ hacking<0.12,>=0.11.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
mock>=2.0 # BSD mock>=2.0 # BSD
python-subunit>=0.0.18 # Apache-2.0/BSD python-subunit>=0.0.18 # Apache-2.0/BSD
requests-mock>=1.1 # Apache-2.0 requests-mock>=1.1 # Apache-2.0

View File

@ -82,6 +82,7 @@ commands = python setup.py build_sphinx
ignore = E125,E126,E128,E129,E265,H404,H405,N530,N537 ignore = E125,E126,E128,E129,E265,H404,H405,N530,N537
show-source = true show-source = true
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios
import-order-style = pep8
[testenv:pylint] [testenv:pylint]
deps = deps =