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: I9ced9c297273db0eec6ab3995b663b1e8dffe87d
This commit is contained in:
John L. Villalovos 2017-02-16 10:11:06 -08:00
parent cd1be9c7eb
commit ea97d2b733
12 changed files with 18 additions and 16 deletions

View File

@ -14,12 +14,12 @@
# under the License.
import os
import six
import sys
from alembic import command as alembic_command
from alembic import config as alembic_config
from alembic import util as alembic_util
import six
from oslo_config import cfg
from oslo_log import log

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import eventlet
import eventlet # noqa
eventlet.monkey_patch()
import functools

View File

@ -12,9 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from alembic import context
from logging.config import fileConfig
from alembic import context
from ironic_inspector import db
# this is the Alembic Config object, which provides

View File

@ -18,7 +18,6 @@ import contextlib
import copy
import datetime
import json
import six
from automaton import exceptions as automaton_errors
from ironicclient import exceptions
@ -29,6 +28,7 @@ from oslo_utils import excutils
from oslo_utils import reflection
from oslo_utils import timeutils
from oslo_utils import uuidutils
import six
from sqlalchemy.orm import exc as orm_errors
from sqlalchemy import text

View File

@ -15,11 +15,10 @@
import copy
import datetime
import json
import os
import eventlet
import json
from oslo_config import cfg
from oslo_serialization import base64
from oslo_utils import excutils

View File

@ -11,28 +11,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import eventlet
import eventlet # noqa
eventlet.monkey_patch()
import datetime
import time
import contextlib
import copy
import datetime
import json
import os
import pytz
import shutil
import six
from six.moves import urllib
import tempfile
import time
import unittest
import mock
from oslo_config import cfg
from oslo_config import fixture as config_fixture
from oslo_utils import timeutils
import pytz
import requests
import six
from six.moves import urllib
from ironic_inspector.common import ironic as ir_utils
from ironic_inspector.common import swift

View File

@ -12,9 +12,9 @@
import json
import os
import six
import time
import six
import tempest
from tempest import config
from tempest.lib.common.api_version_utils import LATEST_MICROVERSION

View File

@ -11,11 +11,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import socket
import unittest
from ironicclient import client
import mock
from oslo_config import cfg
from ironic_inspector.common import ironic as ir_utils

View File

@ -14,7 +14,6 @@
import copy
import datetime
import json
import six
import unittest
import automaton
@ -23,6 +22,7 @@ from oslo_config import cfg
import oslo_db
from oslo_utils import timeutils
from oslo_utils import uuidutils
import six
from ironic_inspector.common import ironic as ir_utils
from ironic_inspector import db

View File

@ -11,6 +11,7 @@
# under the License.
import copy
import mock
from ironic_inspector.common import ironic as ir_utils

View File

@ -3,6 +3,7 @@
# process, which may cause wedges in the gate later.
coverage>=4.0 # Apache-2.0
doc8 # Apache-2.0
flake8-import-order==0.11 # LGPLv3
hacking<0.13,>=0.12.0 # Apache-2.0
mock>=2.0 # BSD
sphinx>=1.5.1 # BSD

View File

@ -51,6 +51,7 @@ max-complexity=15
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H904
import-order-style = pep8
[hacking]
import_exceptions = ironicclient.exceptions,ironic_inspector.common.i18n