flake8: Specify 'nova' as name of app

Specify 'nova' as the name of the application for the flake8-import-order
plugin. That way it knows that imports of nova should come after external
libraries.

Fix issues discovered in ordering by this new check.

Change-Id: I822796ba3d750f93de813035aeee59e8ccb022a2
This commit is contained in:
John L. Villalovos 2017-03-16 13:48:51 -07:00
parent a5d4adbd60
commit 07a042ba2c
9 changed files with 12 additions and 12 deletions

View File

@ -18,12 +18,12 @@ import logging as py_logging
import os
import os.path
from oslo_log import log as logging
from nova.api.openstack.placement import deploy
from nova import conf
from nova import config
from oslo_log import log as logging
CONFIG_FILE = 'nova.conf'

View File

@ -13,11 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from nova.conf import paths
from oslo_config import cfg
from oslo_db import options as oslo_db_options
from nova.conf import paths
_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('nova.sqlite')

View File

@ -13,10 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from nova.conf import paths
from oslo_config import cfg
from nova.conf import paths
xvp_group = cfg.OptGroup(
'xvp',
title='XVP options',

View File

@ -15,6 +15,7 @@
import datetime
import iso8601
from oslo_config import cfg
from nova.api.openstack.compute import availability_zone as az_v21
from nova.api.openstack.compute import extension_info
@ -30,7 +31,6 @@ from nova.tests.unit.api.openstack import fakes
from nova.tests.unit.image import fake
from nova.tests.unit import matchers
from nova.tests.unit.objects import test_service
from oslo_config import cfg
FAKE_UUID = fakes.FAKE_UUID

View File

@ -11,6 +11,7 @@
# under the License.
import mock
from oslo_serialization import jsonutils
import six
import testscenarios
import webob
@ -24,7 +25,6 @@ from nova import test
from nova.tests.unit.api.openstack import fakes
from nova.tests.unit import matchers
from nova.tests.unit import utils
from oslo_serialization import jsonutils
class MicroversionedTest(testscenarios.WithScenarios, test.NoDBTestCase):

View File

@ -18,6 +18,7 @@ import copy
import mock
from oslo_serialization import jsonutils
import testtools
from nova.api.openstack.compute import services
from nova.cells import utils as cells_utils
@ -32,7 +33,6 @@ from nova.tests.unit.api.openstack import fakes
from nova.tests.unit import fake_notifier
from nova.tests.unit.objects import test_objects
from nova.tests.unit.objects import test_service
import testtools
class ComputeHostAPITestCase(test.TestCase):

View File

@ -13,13 +13,13 @@
# under the License.
import mock
from oslo_versionedobjects import fixture as ovo_fixture
from nova import db
from nova.objects import instance
from nova.objects import security_group
from nova.tests.unit.objects import test_objects
from nova.tests import uuidsentinel as uuids
from oslo_versionedobjects import fixture as ovo_fixture
fake_secgroup = {

View File

@ -16,6 +16,7 @@
from cinderclient import exceptions as cinder_exception
from keystoneclient import exceptions as keystone_exception
import mock
from oslo_utils import timeutils
import nova.conf
from nova import context
@ -25,8 +26,6 @@ from nova.tests.unit.fake_instance import fake_instance_obj
from nova.tests import uuidsentinel as uuids
from nova.volume import cinder
from oslo_utils import timeutils
CONF = nova.conf.CONF

View File

@ -160,6 +160,7 @@ 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
application-import-names = nova
# 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