Skip to content

Commit 949f4f5

Browse files
author
John L. Villalovos
committed
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: I946457e9079ce0b54c7fe0ad554d024a1c61dce0
1 parent c25d182 commit 949f4f5

File tree

7 files changed

+9
-6
lines changed

7 files changed

+9
-6
lines changed

ironic_python_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import socket
2020
import threading
2121
import time
22+
from wsgiref import simple_server
2223

2324
from oslo_concurrency import processutils
2425
from oslo_config import cfg
@@ -27,7 +28,6 @@
2728
import pkg_resources
2829
from six.moves.urllib import parse as urlparse
2930
from stevedore import extension
30-
from wsgiref import simple_server
3131

3232
from ironic_python_agent.api import app
3333
from ironic_python_agent import encoding

ironic_python_agent/extensions/standby.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
import hashlib
1616
import os
17-
import requests
18-
import six
1917
import time
2018

2119
from oslo_concurrency import processutils
2220
from oslo_config import cfg
2321
from oslo_log import log
22+
import requests
23+
import six
2424

2525
from ironic_lib import disk_utils
2626
from ironic_python_agent import errors

ironic_python_agent/tests/unit/extensions/test_image.py

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

16-
import mock
1716
import os
1817
import shutil
1918
import tempfile
2019

20+
import mock
2121
from oslo_concurrency import processutils
2222
from oslotest import base as test_base
2323

ironic_python_agent/tests/unit/test_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import socket
1616
import time
17+
from wsgiref import simple_server
1718

1819
import mock
1920
from oslo_concurrency import processutils
@@ -22,7 +23,6 @@
2223
from oslotest import base as test_base
2324
import pkg_resources
2425
from stevedore import extension
25-
from wsgiref import simple_server
2626

2727
from ironic_python_agent import agent
2828
from ironic_python_agent import encoding

ironic_python_agent/tests/unit/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
import subprocess
2222
import tarfile
2323
import tempfile
24-
import testtools
2524

2625
from ironic_lib import utils as ironic_utils
2726
import mock
2827
from oslo_concurrency import processutils
2928
from oslo_serialization import base64
3029
from oslotest import base as test_base
30+
import testtools
3131

3232
from ironic_python_agent import errors
3333
from ironic_python_agent import utils

test-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
99
oslotest>=1.10.0 # Apache-2.0
1010
os-testr>=0.8.0 # Apache-2.0
1111
bashate>=0.2 # Apache-2.0
12+
flake8-import-order==0.11 # LGPLv3
13+
1214
# Doc requirements
1315
doc8 # Apache-2.0
1416
sphinx>=1.5.1 # BSD

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
6161
[flake8]
6262
ignore = E129
6363
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,imagebuild/tinyipa/tinyipafinal,imagebuild/tinyipa/tinyipabuild
64+
import-order-style = pep8
6465
# [H106] Don’t put vim configuration in source files.
6566
# [H203] Use assertIs(Not)None to check for None.
6667
# [H904] Delay string interpolations at logging calls.

0 commit comments

Comments
 (0)