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: I821fd7467f6c5cc1487149297f26e4ad539cf25d
This commit is contained in:
John L. Villalovos 2017-02-16 09:35:28 -08:00
parent 7135b43d15
commit d0a2e13f10
13 changed files with 13 additions and 7 deletions

View File

@ -44,7 +44,6 @@ notifying Neutron of a change, etc.
import collections
import datetime
from six.moves import queue
import tempfile
import eventlet
@ -55,6 +54,7 @@ from oslo_log import log
import oslo_messaging as messaging
from oslo_utils import excutils
from oslo_utils import uuidutils
from six.moves import queue
from ironic.common import driver_factory
from ironic.common import exception

View File

@ -21,7 +21,6 @@ Ironic console utilities.
import errno
import os
import psutil
import signal
import subprocess
import time
@ -31,6 +30,7 @@ from oslo_log import log as logging
from oslo_service import loopingcall
from oslo_utils import fileutils
from oslo_utils import netutils
import psutil
from ironic.common import exception
from ironic.common.i18n import _, _LE, _LW

View File

@ -16,9 +16,9 @@
import ast
import hashlib
import inspect
import six
from oslo_versionedobjects import fields as object_fields
import six
from ironic.common import utils

View File

@ -36,9 +36,9 @@ For postgres on Ubuntu this can be done with the following commands:
import collections
import contextlib
import fixtures
from alembic import script
import fixtures
import mock
from oslo_db import exception as db_exc
from oslo_db.sqlalchemy import enginefacade

View File

@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import time
import types
import mock
from oslo_utils import importutils
from ironic.common import driver_factory

View File

@ -19,7 +19,6 @@
import errno
import os
import psutil
import random
import signal
import string
@ -30,6 +29,7 @@ from ironic_lib import utils as ironic_utils
import mock
from oslo_config import cfg
from oslo_utils import netutils
import psutil
from ironic.common import exception
from ironic.drivers.modules import console_utils

View File

@ -14,6 +14,7 @@
# under the License.
import datetime
import mock
from oslo_utils import uuidutils
from testtools import matchers

View File

@ -14,6 +14,7 @@
# under the License.
import datetime
import mock
from testtools import matchers

View File

@ -15,8 +15,8 @@
import contextlib
import datetime
import gettext
import iso8601
import iso8601
import mock
from oslo_versionedobjects import base as object_base
from oslo_versionedobjects import exception as object_exception

View File

@ -14,6 +14,7 @@
# under the License.
import datetime
import mock
from testtools import matchers

View File

@ -11,6 +11,7 @@
# under the License.
import datetime
import mock
from testtools import matchers

View File

@ -19,6 +19,7 @@ testresources>=0.2.4 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
WebTest>=2.0 # MIT
bashate>=0.2 # Apache-2.0
flake8-import-order==0.11 # LGPLv3
# Doc requirements
sphinx>=1.5.1 # BSD

View File

@ -94,6 +94,7 @@ commands = {posargs}
[flake8]
ignore = E129
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import-order-style = pep8
max-complexity=17
# [H106] Dont put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.