diff --git a/neutron_lib/api/extensions.py b/neutron_lib/api/extensions.py index 1443b8440..d7cd26fb4 100644 --- a/neutron_lib/api/extensions.py +++ b/neutron_lib/api/extensions.py @@ -14,6 +14,7 @@ # under the License. import abc + import six from neutron_lib._i18n import _ diff --git a/neutron_lib/api/validators/__init__.py b/neutron_lib/api/validators/__init__.py index fabc21d05..9a855b46d 100644 --- a/neutron_lib/api/validators/__init__.py +++ b/neutron_lib/api/validators/__init__.py @@ -11,10 +11,10 @@ # under the License. import collections -import re - import functools import inspect +import re + import netaddr from oslo_log import log as logging from oslo_utils import netutils diff --git a/neutron_lib/fixture.py b/neutron_lib/fixture.py index 94735fe08..59296438f 100644 --- a/neutron_lib/fixture.py +++ b/neutron_lib/fixture.py @@ -11,6 +11,7 @@ # under the License. import copy + import fixtures import mock diff --git a/neutron_lib/plugins/ml2/api.py b/neutron_lib/plugins/ml2/api.py index 5fa651300..52d080712 100644 --- a/neutron_lib/plugins/ml2/api.py +++ b/neutron_lib/plugins/ml2/api.py @@ -13,6 +13,7 @@ # under the License. import abc + import six diff --git a/neutron_lib/tests/_tools.py b/neutron_lib/tests/_tools.py index eb4ff0802..0992c2c61 100644 --- a/neutron_lib/tests/_tools.py +++ b/neutron_lib/tests/_tools.py @@ -13,10 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. -import fixtures import platform import warnings +import fixtures + from neutron_lib.utils import helpers diff --git a/test-requirements.txt b/test-requirements.txt index 9dc5c7813..51dd0cf80 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,6 +6,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 python-subunit>=0.0.18 # Apache-2.0/BSD sphinx>=1.6.2 # BSD openstackdocstheme>=1.11.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index cda97a39a..76f3b9611 100644 --- a/tox.ini +++ b/tox.ini @@ -53,6 +53,7 @@ commands = enable-extensions=H904 show-source = True exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools +import-order-style = pep8 [hacking] import_exceptions = neutron_lib._i18n