Use flake8-import-order plugin

Change-Id: I1a62bd919a10a4827da1e2d18bc414168e34702b
This commit is contained in:
Gary Kotton 2017-07-04 22:35:02 -07:00
parent af1d3cb1e5
commit 4a07ba0c2a
14 changed files with 25 additions and 20 deletions

View File

@ -6,6 +6,7 @@ hacking<0.12,>=0.11.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
mock>=2.0 # BSD mock>=2.0 # BSD
python-subunit>=0.0.18 # Apache-2.0/BSD python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.6.2 # BSD sphinx>=1.6.2 # BSD

View File

@ -88,6 +88,7 @@ ignore = N530,E125,E129,N531
show-source = true show-source = true
builtins = _ builtins = _
exclude = build,dist exclude = build,dist
import-order-style = pep8
[hacking] [hacking]
import_exceptions = vmware_nsxlib._i18n, import_exceptions = vmware_nsxlib._i18n,

View File

@ -14,9 +14,9 @@
# limitations under the License. # limitations under the License.
# #
import copy import copy
import mock
import unittest import unittest
import mock
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from oslo_utils import uuidutils from oslo_utils import uuidutils
from requests import exceptions as requests_exceptions from requests import exceptions as requests_exceptions

View File

@ -14,10 +14,10 @@
# under the License. # under the License.
# #
import copy import copy
import requests
from oslo_log import log from oslo_log import log
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
import requests
from vmware_nsxlib.tests.unit.v3 import mocks from vmware_nsxlib.tests.unit.v3 import mocks
from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase

View File

@ -13,12 +13,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
# #
import mock
import six.moves.urllib.parse as urlparse
import unittest import unittest
import mock
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from requests import exceptions as requests_exceptions from requests import exceptions as requests_exceptions
import six.moves.urllib.parse as urlparse
from vmware_nsxlib.tests.unit.v3 import mocks from vmware_nsxlib.tests.unit.v3 import mocks
from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase

View File

@ -13,9 +13,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.
# #
import mock
import unittest import unittest
import mock
from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase
from vmware_nsxlib import v3 from vmware_nsxlib import v3
from vmware_nsxlib.v3 import policy_constants from vmware_nsxlib.v3 import policy_constants

View File

@ -14,8 +14,8 @@
# limitations under the License. # limitations under the License.
# #
import copy import copy
import mock
import mock
from oslo_log import log from oslo_log import log
from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase

View File

@ -14,10 +14,10 @@
# under the License. # under the License.
import abc import abc
import six
from distutils import version from distutils import version
from oslo_log import log from oslo_log import log
import six
from vmware_nsxlib._i18n import _ from vmware_nsxlib._i18n import _
from vmware_nsxlib.v3 import client from vmware_nsxlib.v3 import client

View File

@ -14,12 +14,12 @@
# under the License. # under the License.
# #
import re import re
import requests
import six.moves.urllib.parse as urlparse
import time import time
from oslo_log import log from oslo_log import log
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
import requests
import six.moves.urllib.parse as urlparse
from vmware_nsxlib._i18n import _ from vmware_nsxlib._i18n import _
from vmware_nsxlib.v3 import exceptions from vmware_nsxlib.v3 import exceptions
from vmware_nsxlib.v3 import utils from vmware_nsxlib.v3 import utils

View File

@ -14,11 +14,11 @@
# under the License. # under the License.
import datetime import datetime
from OpenSSL import crypto
from time import time from time import time
import uuid import uuid
from neutron_lib import exceptions from neutron_lib import exceptions
from OpenSSL import crypto
from oslo_log import log from oslo_log import log
from vmware_nsxlib._i18n import _ from vmware_nsxlib._i18n import _

View File

@ -17,20 +17,21 @@ import abc
import contextlib import contextlib
import copy import copy
import datetime import datetime
import eventlet
import itertools import itertools
import logging import logging
import eventlet
from eventlet import greenpool
from eventlet import pools
import OpenSSL import OpenSSL
from oslo_log import log
from oslo_service import loopingcall
import requests import requests
from requests import adapters
from requests import exceptions as requests_exceptions
import six import six
import six.moves.urllib.parse as urlparse import six.moves.urllib.parse as urlparse
from eventlet import greenpool
from eventlet import pools
from oslo_log import log
from oslo_service import loopingcall
from requests import adapters
from requests import exceptions as requests_exceptions
from vmware_nsxlib._i18n import _ from vmware_nsxlib._i18n import _
from vmware_nsxlib.v3 import client as nsx_client from vmware_nsxlib.v3 import client as nsx_client
from vmware_nsxlib.v3 import exceptions from vmware_nsxlib.v3 import exceptions

View File

@ -15,6 +15,7 @@
# #
import abc import abc
import six import six
from vmware_nsxlib.v3 import policy_constants from vmware_nsxlib.v3 import policy_constants

View File

@ -15,10 +15,10 @@
# #
import abc import abc
import six
import uuid import uuid
from oslo_log import log as logging from oslo_log import log as logging
import six
from vmware_nsxlib._i18n import _ from vmware_nsxlib._i18n import _
from vmware_nsxlib.v3 import exceptions from vmware_nsxlib.v3 import exceptions

View File

@ -14,10 +14,10 @@
# under the License. # under the License.
import abc import abc
import tenacity
from neutron_lib import exceptions from neutron_lib import exceptions
from oslo_log import log from oslo_log import log
import tenacity
from vmware_nsxlib._i18n import _ from vmware_nsxlib._i18n import _
from vmware_nsxlib.v3 import exceptions as nsxlib_exceptions from vmware_nsxlib.v3 import exceptions as nsxlib_exceptions