Skip to content

Commit 69db9fe

Browse files
committed
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>
1 parent d15bbad commit 69db9fe

103 files changed

Lines changed: 145 additions & 163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openstackclient/api/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313

1414
"""Base API Library"""
1515

16-
import simplejson as json
17-
1816
from keystoneauth1 import exceptions as ks_exceptions
1917
from keystoneauth1 import session as ks_session
2018
from osc_lib import exceptions
19+
import simplejson as json
2120

2221
from openstackclient.i18n import _
2322

openstackclient/tests/unit/api/test_object_store_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
"""Object Store v1 API Library Tests"""
1515

16-
import mock
16+
from unittest import mock
1717

1818
from keystoneauth1 import session
1919
from requests_mock.contrib import fixture

openstackclient/tests/unit/common/test_availability_zone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# under the License.
1212
#
1313

14-
import mock
14+
from unittest import mock
1515

1616
from openstackclient.common import availability_zone
1717
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

openstackclient/tests/unit/common/test_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414

15-
import mock
15+
from unittest import mock
1616

1717
from osc_lib.command import command
1818
from osc_lib import exceptions

openstackclient/tests/unit/common/test_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# under the License.
1212
#
1313

14-
import mock
14+
from unittest import mock
1515

1616
from openstackclient.common import configuration
1717
from openstackclient.tests.unit import fakes

openstackclient/tests/unit/common/test_extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# under the License.
1212
#
1313

14-
import mock
14+
from unittest import mock
1515

1616
from openstackclient.common import extension
1717
from openstackclient.tests.unit.compute.v2 import fakes as compute_fakes

openstackclient/tests/unit/common/test_logs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
# or Jun 2017.
1616

1717
import logging
18-
19-
import mock
18+
from unittest import mock
2019

2120
from osc_lib import logs
2221

openstackclient/tests/unit/common/test_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
"""Test module module"""
1717

18-
import mock
18+
from unittest import mock
1919

2020
from openstackclient.common import module as osc_module
2121
from openstackclient.tests.unit import fakes

openstackclient/tests/unit/common/test_project_purge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# License for the specific language governing permissions and limitations
1111
# under the License.
1212

13-
import mock
13+
from unittest import mock
1414

1515
from osc_lib import exceptions
1616

openstackclient/tests/unit/common/test_quota.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# under the License.
1212

1313
import copy
14+
from unittest import mock
1415

15-
import mock
1616
from osc_lib import exceptions
1717

1818
from openstackclient.common import quota

0 commit comments

Comments
 (0)