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: Ib3fde54d8baa2c6e3567ff3f1a902de4b25f9f70
This commit is contained in:
John L. Villalovos 2017-02-16 09:51:31 -08:00
parent 061211cf2e
commit 30c946d330
5 changed files with 6 additions and 4 deletions

View File

@ -18,10 +18,8 @@ import logging
import math import math
import os import os
import re import re
import requests
import shlex import shlex
import shutil import shutil
import six
import stat import stat
import tempfile import tempfile
import time import time
@ -32,6 +30,8 @@ from oslo_serialization import base64
from oslo_utils import excutils from oslo_utils import excutils
from oslo_utils import imageutils from oslo_utils import imageutils
from oslo_utils import units from oslo_utils import units
import requests
import six
from ironic_lib.common.i18n import _ from ironic_lib.common.i18n import _
from ironic_lib.common.i18n import _LE from ironic_lib.common.i18n import _LE

View File

@ -23,10 +23,10 @@ SHOULD include dedicated exception logging.
""" """
import logging import logging
import six
from oslo_config import cfg from oslo_config import cfg
from oslo_utils import excutils from oslo_utils import excutils
import six
from ironic_lib.common.i18n import _ from ironic_lib.common.i18n import _
from ironic_lib.common.i18n import _LE from ironic_lib.common.i18n import _LE

View File

@ -14,12 +14,12 @@
# under the License. # under the License.
import gzip import gzip
import mock
import os import os
import shutil import shutil
import stat import stat
import tempfile import tempfile
import mock
from oslo_concurrency import processutils from oslo_concurrency import processutils
from oslo_config import cfg from oslo_config import cfg
from oslo_serialization import base64 from oslo_serialization import base64

View File

@ -4,6 +4,7 @@
coverage>=4.0 # Apache-2.0 coverage>=4.0 # Apache-2.0
eventlet!=0.18.3,>=0.18.2 # MIT eventlet!=0.18.3,>=0.18.2 # MIT
flake8-import-order==0.11 # LGPLv3
hacking<0.12,>=0.11.0 # Apache-2.0 hacking<0.12,>=0.11.0 # Apache-2.0
mock>=2.0 # BSD mock>=2.0 # BSD
os-testr>=0.8.0 # Apache-2.0 os-testr>=0.8.0 # Apache-2.0

View File

@ -18,6 +18,7 @@ commands = ostestr {posargs}
show-source = True show-source = True
ignore = E129 ignore = E129
exclude = .venv,.tox,dist,doc,*.egg,.update-venv exclude = .venv,.tox,dist,doc,*.egg,.update-venv
import-order-style = pep8
[testenv:pep8] [testenv:pep8]
commands = commands =