diff --git a/lower-constraints.txt b/lower-constraints.txt index 49b60090..b155923f 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -1,6 +1,7 @@ coverage===4.0 cryptography===2.1 fixtures===3.0.0 +flake8-import-order==0.17.1 openstackdocstheme==1.18.1 oslotest===3.2.0 python-dateutil==2.8.1 diff --git a/pyghmi/cmd/pyghmicons.py b/pyghmi/cmd/pyghmicons.py index e22d9a6d..3d1d04be 100755 --- a/pyghmi/cmd/pyghmicons.py +++ b/pyghmi/cmd/pyghmicons.py @@ -22,9 +22,10 @@ import termios import threading import tty -from pyghmi.ipmi import console import six +from pyghmi.ipmi import console + def _doinput(sol): while True: diff --git a/pyghmi/cmd/virshbmc.py b/pyghmi/cmd/virshbmc.py index 1eed8ab0..7c903122 100755 --- a/pyghmi/cmd/virshbmc.py +++ b/pyghmi/cmd/virshbmc.py @@ -19,6 +19,7 @@ import sys import threading import libvirt + import pyghmi.ipmi.bmc as bmc diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index 814b0640..ef6be06b 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -21,9 +21,10 @@ import ast import random import struct +import six + import pyghmi.exceptions as pygexc from pyghmi.ipmi.oem.lenovo import EfiDecompressor -import six try: import EfiCompressor diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 1ed8e411..2978821f 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -27,6 +27,8 @@ import socket import struct import weakref +import six + import pyghmi.constants as pygconst import pyghmi.exceptions as pygexc import pyghmi.ipmi.oem.lenovo.config as config @@ -37,7 +39,6 @@ from pyghmi.ipmi import sdr import pyghmi.media as media import pyghmi.storage as storage import pyghmi.util.webclient as webclient -import six try: from urllib import urlencode diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index 7e6dc013..4899e381 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -18,12 +18,13 @@ import weakref from xml.etree.ElementTree import fromstring import zipfile +import six + import pyghmi.constants as pygconst import pyghmi.exceptions as pygexc import pyghmi.ipmi.private.session as ipmisession from pyghmi.ipmi import sdr import pyghmi.util.webclient as webclient -import six try: from urllib import urlencode diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index be07d5d0..115ddac6 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -30,6 +30,7 @@ from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import algorithms from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers import modes + import pyghmi.exceptions as exc from pyghmi.ipmi.private import constants from pyghmi.ipmi.private import util diff --git a/pyghmi/ipmi/private/simplesession.py b/pyghmi/ipmi/private/simplesession.py index e9e7901a..306e6297 100644 --- a/pyghmi/ipmi/private/simplesession.py +++ b/pyghmi/ipmi/private/simplesession.py @@ -29,6 +29,7 @@ from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import algorithms from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers import modes + import pyghmi.exceptions as exc from pyghmi.ipmi.private import constants from pyghmi.ipmi.private import util diff --git a/pyghmi/ipmi/sdr.py b/pyghmi/ipmi/sdr.py index 8a4409f2..5fde6cbe 100644 --- a/pyghmi/ipmi/sdr.py +++ b/pyghmi/ipmi/sdr.py @@ -36,10 +36,11 @@ import string import struct import weakref +import six + import pyghmi.constants as const import pyghmi.exceptions as exc import pyghmi.ipmi.private.constants as ipmiconst -import six try: import cPickle as pickle diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index ce7aac7a..e85e8530 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -31,6 +31,7 @@ import sys import time from dateutil import tz + import pyghmi.constants as const import pyghmi.exceptions as exc import pyghmi.redfish.oem.lookup as oem diff --git a/pyghmi/util/webclient.py b/pyghmi/util/webclient.py index cb203e5e..d9e92aee 100644 --- a/pyghmi/util/webclient.py +++ b/pyghmi/util/webclient.py @@ -25,9 +25,10 @@ import socket import ssl import threading -import pyghmi.exceptions as pygexc import six +import pyghmi.exceptions as pygexc + try: import Cookie import httplib diff --git a/test-requirements.txt b/test-requirements.txt index 3514ec12..875dc21c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,4 +11,4 @@ stestr>=1.0.0 # Apache-2.0 testscenarios>=0.4 testtools>=2.2.0 oslotest>=3.2.0 # Apache-2.0 -flake8-import-order>=0.13 # LGPLv3 +flake8-import-order>=0.17.1 # LGPLv3 diff --git a/tox.ini b/tox.ini index 1298bf4e..2e94c0db 100644 --- a/tox.ini +++ b/tox.ini @@ -54,6 +54,8 @@ ignore = E129,E731,W503 # H904: Delay string interpolations at logging calls enable-extensions=H106,H203,H204,H205,H904 import-order-style = pep8 +application-import-names = pyghmi +filename = *.py [testenv:lower-constraints] deps =