Use flake8-import-order

Use the flake8 plugin flake8-import-order to check import ordering. It can do
it automatically and don't need reviewers to check it.

Change-Id: Ief79a4696d7cd9b57e61a68e76bebb01027ed44c
This commit is contained in:
John L. Villalovos 2017-02-27 12:34:33 -08:00
parent ba6ec012e8
commit b494488945
8 changed files with 10 additions and 5 deletions

View File

@ -5,6 +5,7 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage>=3.6 coverage>=3.6
flake8-import-order==0.11 # LGPLv3
freezegun>=0.3.6 # Apache-2.0 freezegun>=0.3.6 # Apache-2.0
python-subunit>=0.0.18 python-subunit>=0.0.18
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2

View File

@ -71,3 +71,4 @@ commands =
show-source = True show-source = True
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,node_modules exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,node_modules
import-order-style = pep8

View File

@ -19,6 +19,7 @@
import logging import logging
from six.moves import configparser from six.moves import configparser

View File

@ -1,4 +1,5 @@
from unittest import TestCase from unittest import TestCase
from valence.api.route import app from valence.api.route import app

View File

@ -11,10 +11,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 valence.api import app from valence.api import app

View File

@ -11,9 +11,10 @@
# under the License. # under the License.
import copy import copy
import mock
import unittest import unittest
import mock
from valence.common import constants from valence.common import constants
from valence.common.exception import BadRequest from valence.common.exception import BadRequest
from valence.controller import podmanagers from valence.controller import podmanagers

View File

@ -12,11 +12,11 @@
# under the License. # under the License.
import json import json
import mock
import unittest import unittest
import etcd import etcd
import freezegun import freezegun
import mock
from valence.db import api as db_api from valence.db import api as db_api
from valence.tests.unit.db import utils from valence.tests.unit.db import utils

View File

@ -11,10 +11,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 etcd import etcd
import mock
from valence.db import etcd_db from valence.db import etcd_db