Raise flake8-import-order version to latest

We had this library capped at a release that is a few years old. Now
that we have dropped py2 testing, we can pick up the latest version.

This uncovered a few things to clean up. Mostly the fact that mock is
now a part of the StdLib unittest since Python 3.3.

Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-01-10 14:21:47 -06:00
parent d15bbada73
commit 69db9fe73c
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
103 changed files with 145 additions and 163 deletions

View File

@ -13,11 +13,10 @@
"""Base API Library"""
import simplejson as json
from keystoneauth1 import exceptions as ks_exceptions
from keystoneauth1 import session as ks_session
from osc_lib import exceptions
import simplejson as json
from openstackclient.i18n import _

View File

@ -13,7 +13,7 @@
"""Object Store v1 API Library Tests"""
import mock
from unittest import mock
from keystoneauth1 import session
from requests_mock.contrib import fixture

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.common import availability_zone
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib.command import command
from osc_lib import exceptions

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.common import configuration
from openstackclient.tests.unit import fakes

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.common import extension
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

View File

@ -15,8 +15,7 @@
# or Jun 2017.
import logging
import mock
from unittest import mock
from osc_lib import logs

View File

@ -15,7 +15,7 @@
"""Test module module"""
import mock
from unittest import mock
from openstackclient.common import module as osc_module
from openstackclient.tests.unit import fakes

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from openstackclient.common import quota

View File

@ -14,9 +14,9 @@
#
import copy
from unittest import mock
import uuid
import mock
from novaclient import api_versions
from openstackclient.api import compute_v2

View File

@ -13,8 +13,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -13,8 +13,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.compute.v2 import console
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

View File

@ -13,8 +13,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
import novaclient
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.compute.v2 import host
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

View File

@ -13,10 +13,10 @@
# under the License.
#
from unittest import mock
from unittest.mock import call
import uuid
import mock
from mock import call
from osc_lib import exceptions
from osc_lib import utils

View File

@ -16,9 +16,9 @@ import argparse
import collections
import copy
import getpass
from unittest import mock
from unittest.mock import call
import mock
from mock import call
from novaclient import api_versions
from openstack import exceptions as sdk_exceptions
from osc_lib import exceptions

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import mock
from unittest import mock
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -13,8 +13,9 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from novaclient import api_versions
from osc_lib import exceptions
import six

View File

@ -12,8 +12,8 @@
#
import datetime
from unittest import mock
import mock
from novaclient import api_versions
from openstackclient.compute.v2 import usage

View File

@ -15,9 +15,9 @@
import json
import sys
from unittest import mock
from keystoneauth1 import fixture
import mock
import requests
import six

View File

@ -14,11 +14,11 @@
#
import copy
from unittest 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

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.identity.v2_0 import catalog
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from keystoneauth1 import exceptions as ks_exc
from osc_lib.cli import format_columns

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from keystoneauth1 import exceptions as ks_exc
from osc_lib import exceptions

View File

@ -12,8 +12,8 @@
#
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from openstackclient.identity.v2_0 import role_assignment

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.identity.v2_0 import token
from openstackclient.tests.unit.identity.v2_0 import fakes as identity_fakes

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from keystoneauth1 import exceptions as ks_exc
from osc_lib import exceptions

View File

@ -15,11 +15,11 @@
import copy
import datetime
from unittest import mock
import uuid
from keystoneauth1 import access
from keystoneauth1 import fixture
import mock
from osc_lib.cli import format_columns
from openstackclient.tests.unit import fakes

View File

@ -14,8 +14,8 @@
#
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.identity.v3 import catalog
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes

View File

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.identity.v3 import endpoint_group
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from keystoneauth1 import exceptions as ks_exc
from osc_lib import exceptions

View File

@ -13,8 +13,7 @@
# under the License.
import copy
import mock
from unittest import mock
from openstackclient.identity.v3 import identity_provider
from openstackclient.tests.unit import fakes

View File

@ -13,8 +13,8 @@
# under the License.
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from openstackclient.identity.v3 import mapping

View File

@ -13,8 +13,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions
from osc_lib import utils

View File

@ -14,8 +14,8 @@
#
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -12,8 +12,7 @@
#
import copy
import mock
from unittest import mock
from openstackclient.identity.v3 import role_assignment
from openstackclient.tests.unit import fakes

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.identity.v3 import token
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes

View File

@ -12,8 +12,8 @@
#
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -14,8 +14,8 @@
#
import contextlib
from unittest import mock
import mock
from osc_lib import exceptions
from osc_lib import utils

View File

@ -14,10 +14,9 @@
#
import copy
from unittest 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

View File

@ -14,8 +14,7 @@
#
import copy
import mock
from unittest import mock
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -15,10 +15,10 @@
import copy
import random
from unittest import mock
import uuid
from glanceclient.v2 import schemas
import mock
from osc_lib.cli import format_columns
import warlock

View File

@ -14,10 +14,10 @@
#
import copy
from unittest import mock
from glanceclient.common import utils as glanceclient_utils
from glanceclient.v2 import schemas
import mock
from osc_lib.cli import format_columns
from osc_lib import exceptions
import warlock

View File

@ -11,9 +11,9 @@
# under the License.
import copy
from unittest import mock
import fixtures
import mock
from osc_lib.tests import utils as osc_lib_utils
from openstackclient import shell

View File

@ -12,8 +12,8 @@
#
import argparse
from unittest import mock
import mock
import openstack
from osc_lib import exceptions

View File

@ -15,10 +15,9 @@ import argparse
import copy
from random import choice
from random import randint
from unittest import mock
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

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from openstackclient.network.v2 import floating_ip_pool
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,7 +11,7 @@
# under the License.
#
import mock
from unittest import mock
from osc_lib.cli import format_columns

View File

@ -12,9 +12,8 @@
#
import random
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from openstackclient.network.v2 import network_auto_allocated_topology
from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -14,7 +14,7 @@
# under the License.
#
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from openstackclient.network.v2 import network_qos_rule_type as _qos_rule_type
from openstackclient.tests.unit.network.v2 import fakes as network_fakes

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -14,8 +14,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from openstackclient.network.v2 import network_service_provider \
as service_provider

View File

@ -12,9 +12,9 @@
#
import argparse
from unittest import mock
from unittest.mock import call
import mock
from mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions
from osc_lib import utils

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions

View File

@ -11,8 +11,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
#
import argparse
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -13,9 +13,8 @@
# under the License.
#
import six
from keystoneauth1 import session
import six
from openstackclient.api import object_store_v1 as object_store
from openstackclient.tests.unit import utils

View File

@ -14,8 +14,7 @@
#
import copy
import mock
from unittest import mock
from openstackclient.api import object_store_v1 as object_store
from openstackclient.object.v1 import container

View File

@ -14,8 +14,7 @@
#
import copy
import mock
from unittest import mock
from openstackclient.api import object_store_v1 as object_store
from openstackclient.object.v1 import object as obj

View File

@ -12,8 +12,8 @@
#
import copy
from unittest import mock
import mock
from osc_lib import exceptions
from requests_mock.contrib import fixture
import six

View File

@ -15,8 +15,8 @@
import os
import sys
from unittest import mock
import mock
from osc_lib.tests import utils as osc_lib_test_utils
from oslo_utils import importutils
import wrapt

View File

@ -16,12 +16,11 @@
import os
from cliff import columns as cliff_columns
import fixtures
from six.moves import StringIO
import testtools
from cliff import columns as cliff_columns
from openstackclient.tests.unit import fakes

View File

@ -13,7 +13,7 @@
# under the License.
#
import mock
from unittest import mock
from cinderclient.v3 import volume_snapshots
from cinderclient.v3 import volumes

View File

@ -15,10 +15,9 @@
import copy
import random
from unittest import mock
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

View File

@ -14,9 +14,8 @@
#
import copy
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,8 +12,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions
from osc_lib import utils

View File

@ -12,8 +12,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -14,9 +14,8 @@
#
import argparse
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,8 +12,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions
from osc_lib import utils

View File

@ -14,10 +14,9 @@
import copy
import random
from unittest import mock
import uuid
import mock
from osc_lib.cli import format_columns
from openstackclient.tests.unit import fakes

View File

@ -12,8 +12,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,7 +12,7 @@
# under the License.
#
from mock import call
from unittest.mock import call
from openstackclient.tests.unit.volume.v2 import fakes as volume_fakes
from openstackclient.volume.v2 import consistency_group_snapshot

View File

@ -14,9 +14,8 @@
#
import copy
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

View File

@ -12,8 +12,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib import exceptions
from osc_lib import utils

View File

@ -12,8 +12,8 @@
# under the License.
#
import mock
from mock import call
from unittest import mock
from unittest.mock import call
from osc_lib.cli import format_columns
from osc_lib import exceptions

Some files were not shown because too many files have changed in this diff Show More