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 5cf6bbf374
commit 66866b3ce6
25 changed files with 35 additions and 22 deletions

View File

@ -15,13 +15,13 @@
"""Render vendordata as stored fetched from REST microservices."""
import six
import sys
from keystoneauth1 import exceptions as ks_exceptions
from keystoneauth1 import loading as ks_loading
from oslo_log import log as logging
from oslo_serialization import jsonutils
import six
from nova.api.metadata import vendordata
import nova.conf

View File

@ -15,6 +15,7 @@
# under the License.
import copy
from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_utils import strutils

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

@ -17,13 +17,14 @@ CLI interface for nova status commands.
"""
from __future__ import print_function
# enum comes from the enum34 package if python < 3.4, else it's stdlib
import enum
import functools
import sys
import textwrap
import traceback
# enum comes from the enum34 package if python < 3.4, else it's stdlib
import enum
from keystoneauth1 import exceptions as ks_exc
from keystoneauth1 import loading as keystone
from oslo_config import cfg

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import socket
from oslo_config import cfg
from oslo_utils import units
import socket
xenserver_group = cfg.OptGroup('xenserver',
title='Xenserver Options',

View File

@ -16,12 +16,12 @@
import functools
import math
import re
from six.moves.urllib import parse
import time
from keystoneauth1 import exceptions as ks_exc
from keystoneauth1 import loading as keystone
from oslo_log import log as logging
from six.moves.urllib import parse
from nova.compute import utils as compute_utils
import nova.conf

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

@ -9,9 +9,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
import time
import mock
from nova import context
from nova import exception
from nova.tests import fixtures

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

@ -18,13 +18,13 @@
"""Tests for compute service."""
import datetime
from itertools import chain
import operator
import sys
import time
import traceback
import uuid
from itertools import chain
import mock
from neutronclient.common import exceptions as neutron_exceptions
from oslo_log import log as logging

View File

@ -11,6 +11,7 @@
# under the License.
import copy
import mock
from nova import context

View File

@ -11,6 +11,7 @@
# under the License.
import datetime
from nova import objects
from nova.scheduler.filters import metrics_filter
from nova import test

View File

@ -14,11 +14,11 @@
import copy
import re
import sys
import fixtures
from jsonschema import exceptions as jsonschema_exc
import six
import sys
from nova.api.openstack import api_version_request as api_version
from nova.api import validation

View File

@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import sqlalchemy
import sys
import fixtures as fx
@ -22,6 +21,7 @@ import mock
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import uuidutils
import sqlalchemy
import testtools
from nova.compute import rpcapi as compute_rpcapi

View File

@ -21,7 +21,6 @@ import hashlib
import hmac
import os
import re
import requests
try:
import cPickle as pickle
@ -35,6 +34,7 @@ from oslo_config import cfg
from oslo_serialization import base64
from oslo_serialization import jsonutils
from oslo_utils import encodeutils
import requests
import six
import webob

View File

@ -18,7 +18,6 @@ from collections import OrderedDict
import contextlib
import copy
import datetime
import ddt
import errno
import glob
import os
@ -29,6 +28,7 @@ import signal
import threading
import time
import ddt
import eventlet
from eventlet import greenthread
import fixtures

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import ddt
import functools
import os
import tempfile
import ddt
import mock
from oslo_concurrency import processutils
from oslo_config import cfg

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

@ -15,10 +15,11 @@
import binascii
import uuid
from castellan.common.objects import symmetric_key as key
import mock
from oslo_concurrency import processutils
import uuid
from nova.tests.unit.volume.encryptors import test_cryptsetup
from nova.volume.encryptors import luks

View File

@ -27,6 +27,8 @@ higher level APIs around the raw libvirt API. These APIs are
then used by all the other libvirt related classes
"""
import time
from lxml import etree
from oslo_log import log as logging
from oslo_service import loopingcall
@ -34,7 +36,6 @@ from oslo_utils import encodeutils
from oslo_utils import excutils
from oslo_utils import importutils
import six
import time
from nova.compute import power_state
from nova import exception

View File

@ -18,6 +18,7 @@
"""
from collections import deque
from lxml import etree
from oslo_log import log as logging

View File

@ -19,8 +19,8 @@
"""VIF drivers for libvirt."""
import copy
import os
import os_vif
from os_vif import exception as osv_exception
from oslo_concurrency import processutils

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