Use flake8-import-order plugin
In reviews we usually check import grouping but it is boring. By using flake8-import-order plugin, we can avoid this. It enforces loose checking so it sounds good to use it. This flake8 plugin is already used in tempest. Note that flake8-import-order version is pinned to avoid unexpected breakage of pep8 job. Setup for unit tests of hacking rules is tweaked to disable flake8-import-order checks. This extension assumes an actual file exists and causes hacking rule unit tests. Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
This commit is contained in:
parent
53bea90a75
commit
f3bbf52b3c
@ -16,11 +16,11 @@
|
||||
"""Manage access to the clients, including authenticating when needed."""
|
||||
|
||||
import logging
|
||||
import pkg_resources
|
||||
import sys
|
||||
|
||||
from osc_lib import clientmanager
|
||||
from osc_lib import shell
|
||||
import pkg_resources
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -16,10 +16,10 @@
|
||||
"""Compute v2 Server operation event implementations"""
|
||||
|
||||
import logging
|
||||
import six
|
||||
|
||||
from osc_lib.command import command
|
||||
from osc_lib import utils
|
||||
import six
|
||||
|
||||
from openstackclient.i18n import _
|
||||
|
||||
|
@ -14,10 +14,10 @@ import os
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import testtools
|
||||
|
||||
from tempest.lib.cli import output_parser
|
||||
from tempest.lib import exceptions
|
||||
import testtools
|
||||
|
||||
|
||||
COMMON_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
@ -15,6 +15,7 @@
|
||||
# or Jun 2017.
|
||||
|
||||
import logging
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.common import logs
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
|
||||
from openstackclient.common import quota
|
||||
|
@ -14,9 +14,10 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.api import compute_v2
|
||||
from openstackclient.tests.unit import fakes
|
||||
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes
|
||||
|
@ -13,10 +13,10 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
import argparse
|
||||
import collections
|
||||
import getpass
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils as common_utils
|
||||
from oslo_utils import timeutils
|
||||
|
@ -12,6 +12,7 @@
|
||||
#
|
||||
|
||||
import datetime
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.compute.v2 import usage
|
||||
|
@ -14,10 +14,10 @@
|
||||
#
|
||||
|
||||
import json
|
||||
import mock
|
||||
import sys
|
||||
|
||||
from keystoneauth1 import fixture
|
||||
import mock
|
||||
import requests
|
||||
import six
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import uuid
|
||||
|
||||
from keystoneauth1 import access
|
||||
from keystoneauth1 import fixture
|
||||
import mock
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
from openstackclient.tests.unit import utils
|
||||
|
@ -12,8 +12,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
|
||||
from openstackclient.identity.v2_0 import role_assignment
|
||||
|
@ -14,11 +14,11 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import uuid
|
||||
|
||||
from keystoneauth1 import access
|
||||
from keystoneauth1 import fixture
|
||||
import mock
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
from openstackclient.tests.unit import utils
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.identity.v3 import identity_provider
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
|
||||
from openstackclient.identity.v3 import mapping
|
||||
|
@ -14,8 +14,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.identity.v3 import role_assignment
|
||||
|
@ -12,8 +12,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
#
|
||||
|
||||
import contextlib
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -14,9 +14,10 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
from openstackclient.tests.unit import utils
|
||||
from openstackclient.tests.unit.volume.v1 import fakes as volume_fakes
|
||||
|
@ -14,8 +14,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -14,11 +14,11 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import random
|
||||
import uuid
|
||||
|
||||
from glanceclient.v2 import schemas
|
||||
import mock
|
||||
from osc_lib import utils as common_utils
|
||||
import warlock
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
from glanceclient.v2 import schemas
|
||||
import mock
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils as common_utils
|
||||
import warlock
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osc_lib_utils
|
||||
|
||||
from openstackclient import shell
|
||||
|
@ -12,6 +12,7 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
|
||||
import mock
|
||||
|
||||
import openstack
|
||||
|
@ -13,11 +13,12 @@
|
||||
|
||||
import argparse
|
||||
import copy
|
||||
import mock
|
||||
from random import choice
|
||||
from random import randint
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes_v3
|
||||
from openstackclient.tests.unit import utils
|
||||
|
@ -11,10 +11,10 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
import random
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -12,8 +12,8 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
import mock
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
@ -12,9 +12,9 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.api import object_store_v1 as object_store
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.api import object_store_v1 as object_store
|
||||
|
@ -13,10 +13,10 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
import os
|
||||
import sys
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osc_lib_test_utils
|
||||
from oslo_utils import importutils
|
||||
import wrapt
|
||||
|
@ -14,8 +14,9 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import fixtures
|
||||
import os
|
||||
|
||||
import fixtures
|
||||
import testtools
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
|
@ -14,10 +14,11 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import random
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes
|
||||
from openstackclient.tests.unit import utils
|
||||
|
@ -14,9 +14,9 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -14,9 +14,9 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -13,10 +13,10 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
import mock
|
||||
import random
|
||||
import uuid
|
||||
|
||||
import mock
|
||||
from osc_lib import utils as common_utils
|
||||
|
||||
from openstackclient.tests.unit import fakes
|
||||
|
@ -14,9 +14,9 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
#
|
||||
|
||||
import argparse
|
||||
|
||||
import mock
|
||||
from mock import call
|
||||
|
||||
from osc_lib import exceptions
|
||||
from osc_lib import utils
|
||||
|
||||
|
@ -5,6 +5,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.13 # LGPLv3
|
||||
mock>=2.0 # BSD
|
||||
openstackdocstheme>=1.16.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user