Use flake8-import-order

Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.

Change-Id: Ia3d81bbbb44b40804b3268c0e648276a36cb4805
This commit is contained in:
John L. Villalovos 2017-02-17 11:26:41 -08:00
parent 2b7ccf35e6
commit 146023efc4
7 changed files with 11 additions and 7 deletions

View File

@ -12,8 +12,8 @@
"""Placement API handlers for resource providers."""
import copy
import jsonschema
import jsonschema
from oslo_db import exception as db_exc
from oslo_serialization import jsonutils
from oslo_utils import encodeutils

View File

@ -12,6 +12,7 @@
"""Utility methods for placement API."""
import functools
import jsonschema
from oslo_middleware import request_id
from oslo_serialization import jsonutils

View File

@ -20,19 +20,19 @@ Allows overriding of flags for use of fakes, and some black magic for
inline callbacks.
"""
import contextlib
import datetime
import eventlet
import eventlet # noqa
eventlet.monkey_patch(os=False)
import contextlib
import copy
import datetime
import inspect
import mock
import os
import pprint
import fixtures
import mock
from oslo_cache import core as cache
from oslo_concurrency import lockutils
from oslo_config import cfg

View File

@ -13,9 +13,10 @@
"""Tests for placement microversion handling."""
import collections
import mock
import operator
import mock
# import the handlers to load up handler decorators
import nova.api.openstack.placement.handler # noqa
from nova.api.openstack.placement import microversion

View File

@ -16,12 +16,12 @@
import binascii
import copy
import uuid
from castellan.common.objects import symmetric_key as key
import mock
from oslo_concurrency import processutils
import six
import uuid
from nova import exception
from nova.tests.unit.volume.encryptors import test_base

View File

@ -6,6 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.11 # LGPLv3
mock>=2.0 # BSD
mox3!=0.19.0,>=0.7.0 # Apache-2.0
psycopg2>=2.5 # LGPL/ZPL

View File

@ -157,6 +157,7 @@ commands = bash -c tools/releasenotes_tox.sh
enable-extensions = H106,H203,H904
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools/xenserver*,releasenotes
import-order-style = pep8
# To get a list of functions that are more complex than 25, set max-complexity
# to 25 and run 'tox -epep8'.
# 34 is currently the most complex thing we have