flake8-import-order: Ensure to place project imports last

To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checked only standard imports or not.

Change-Id: Iad7afa456cec7cf5b44955f1ea03c593a4c0e426
This commit is contained in:
Akihiro Motoki 2017-08-22 21:38:07 +00:00
parent 5cc4d5b530
commit ff85c62707
5 changed files with 8 additions and 6 deletions

View File

@ -13,11 +13,11 @@
import json import json
import tempfile import tempfile
from openstackclient.tests.functional import base
from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import data_utils
from tempest.lib import exceptions from tempest.lib import exceptions
from openstackclient.tests.functional import base
class KeypairBase(base.TestCase): class KeypairBase(base.TestCase):
"""Methods for functional tests.""" """Methods for functional tests."""

View File

@ -10,9 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from openstackclient.tests.functional.identity.v3 import common
from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import data_utils
from openstackclient.tests.functional.identity.v3 import common
class ServiceProviderTests(common.IdentityTests): class ServiceProviderTests(common.IdentityTests):
# Introduce functional test cases for command 'Service Provider' # Introduce functional test cases for command 'Service Provider'

View File

@ -13,12 +13,12 @@
"""Compute v2 API Library Tests""" """Compute v2 API Library Tests"""
from keystoneclient import session
from osc_lib import exceptions as osc_lib_exceptions
from requests_mock.contrib import fixture from requests_mock.contrib import fixture
from keystoneclient import session
from openstackclient.api import compute_v2 as compute from openstackclient.api import compute_v2 as compute
from openstackclient.tests.unit import utils from openstackclient.tests.unit import utils
from osc_lib import exceptions as osc_lib_exceptions
FAKE_PROJECT = 'xyzpdq' FAKE_PROJECT = 'xyzpdq'

View File

@ -14,8 +14,8 @@
import argparse import argparse
import mock import mock
import openstack import openstack
from openstackclient.common import exceptions from openstackclient.common import exceptions
from openstackclient.network import common from openstackclient.network import common
from openstackclient.tests.unit import utils from openstackclient.tests.unit import utils

View File

@ -92,3 +92,4 @@ exclude = .git,.tox,dist,doc,*lib/python*,*egg,build,tools
# Doc: http://flake8.readthedocs.org/en/latest/config.html#default # Doc: http://flake8.readthedocs.org/en/latest/config.html#default
ignore = __ ignore = __
import-order-style = pep8 import-order-style = pep8
application_import_names = openstackclient