Check import order

Restore pep 8check for import order.
Set flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.

Change-Id: I989a84e362a18225c6f79580b22bb028d3e265ff
This commit is contained in:
Riccardo Pittau 2020-04-20 10:04:17 +02:00
parent 65deab2930
commit 389cab712e
12 changed files with 13 additions and 9 deletions

View File

@ -19,9 +19,10 @@
import argparse
import logging
from ironicclient.common import http
from osc_lib import utils
from ironicclient.common import http
LOG = logging.getLogger(__name__)
CLIENT_CLASS = 'ironicclient.v1.client.Client'

View File

@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import ddt
import json
import ddt
from tempest.lib.common.utils import data_utils
from ironicclient.tests.functional.osc.v1 import base

View File

@ -13,7 +13,6 @@
# under the License.
import ddt
from tempest.lib.common.utils import data_utils
from ironicclient.tests.functional.osc.v1 import base

View File

@ -16,11 +16,10 @@
from http import client as http_client
import time
from keystoneauth1 import exceptions as kexc
import mock
from oslo_serialization import jsonutils
from keystoneauth1 import exceptions as kexc
from ironicclient.common import filecache
from ironicclient.common import http
from ironicclient import exc

View File

@ -15,8 +15,8 @@
#
import copy
import mock
import mock
from osc_lib.tests import utils as oscutils
from ironicclient import exc

View File

@ -12,7 +12,6 @@
#
import mock
from osc_lib.tests import utils as oscutils
from ironicclient.osc.v1 import baremetal_create

View File

@ -15,8 +15,8 @@
#
import copy
import mock
import mock
from osc_lib.tests import utils as oscutils
from ironicclient.common import utils as commonutils

View File

@ -11,7 +11,6 @@
# under the License.
import mock
from openstack import config
from ironicclient import client as iroclient

View File

@ -11,6 +11,7 @@
# under the License.
import builtins
import jsonschema
import mock

View File

@ -20,6 +20,7 @@ extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
flake8==2.5.5
flake8-import-order==0.17.1
future==0.16.0
hacking==3.0.0
idna==2.6

View File

@ -4,6 +4,7 @@
hacking>=3.0.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3
fixtures>=3.0.0 # Apache-2.0/BSD
requests-mock>=1.2.0 # Apache-2.0
mock>=2.0.0 # BSD

View File

@ -81,6 +81,9 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H210,H904
filename = *.py
import-order-style = pep8
application-import-names = ironicclient
[hacking]
import_exceptions = testtools.matchers, ironicclient.common.i18n