Update pep8 import order check

Set flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.

Change-Id: I3ef01e49c0e6822368146434f056ac7a1aa7ce4d
This commit is contained in:
Riccardo Pittau
2020-05-11 14:08:17 +02:00
parent 17d1b79a57
commit a5129fbdb3
13 changed files with 20 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
coverage===4.0 coverage===4.0
cryptography===2.1 cryptography===2.1
fixtures===3.0.0 fixtures===3.0.0
flake8-import-order==0.17.1
openstackdocstheme==1.18.1 openstackdocstheme==1.18.1
oslotest===3.2.0 oslotest===3.2.0
python-dateutil==2.8.1 python-dateutil==2.8.1

View File

@@ -22,9 +22,10 @@ import termios
import threading import threading
import tty import tty
from pyghmi.ipmi import console
import six import six
from pyghmi.ipmi import console
def _doinput(sol): def _doinput(sol):
while True: while True:

View File

@@ -19,6 +19,7 @@ import sys
import threading import threading
import libvirt import libvirt
import pyghmi.ipmi.bmc as bmc import pyghmi.ipmi.bmc as bmc

View File

@@ -21,9 +21,10 @@ import ast
import random import random
import struct import struct
import six
import pyghmi.exceptions as pygexc import pyghmi.exceptions as pygexc
from pyghmi.ipmi.oem.lenovo import EfiDecompressor from pyghmi.ipmi.oem.lenovo import EfiDecompressor
import six
try: try:
import EfiCompressor import EfiCompressor

View File

@@ -27,6 +27,8 @@ import socket
import struct import struct
import weakref import weakref
import six
import pyghmi.constants as pygconst import pyghmi.constants as pygconst
import pyghmi.exceptions as pygexc import pyghmi.exceptions as pygexc
import pyghmi.ipmi.oem.lenovo.config as config import pyghmi.ipmi.oem.lenovo.config as config
@@ -37,7 +39,6 @@ from pyghmi.ipmi import sdr
import pyghmi.media as media import pyghmi.media as media
import pyghmi.storage as storage import pyghmi.storage as storage
import pyghmi.util.webclient as webclient import pyghmi.util.webclient as webclient
import six
try: try:
from urllib import urlencode from urllib import urlencode

View File

@@ -18,12 +18,13 @@ import weakref
from xml.etree.ElementTree import fromstring from xml.etree.ElementTree import fromstring
import zipfile import zipfile
import six
import pyghmi.constants as pygconst import pyghmi.constants as pygconst
import pyghmi.exceptions as pygexc import pyghmi.exceptions as pygexc
import pyghmi.ipmi.private.session as ipmisession import pyghmi.ipmi.private.session as ipmisession
from pyghmi.ipmi import sdr from pyghmi.ipmi import sdr
import pyghmi.util.webclient as webclient import pyghmi.util.webclient as webclient
import six
try: try:
from urllib import urlencode from urllib import urlencode

View File

@@ -30,6 +30,7 @@ from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import algorithms from cryptography.hazmat.primitives.ciphers import algorithms
from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers import Cipher
from cryptography.hazmat.primitives.ciphers import modes from cryptography.hazmat.primitives.ciphers import modes
import pyghmi.exceptions as exc import pyghmi.exceptions as exc
from pyghmi.ipmi.private import constants from pyghmi.ipmi.private import constants
from pyghmi.ipmi.private import util from pyghmi.ipmi.private import util

View File

@@ -29,6 +29,7 @@ from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import algorithms from cryptography.hazmat.primitives.ciphers import algorithms
from cryptography.hazmat.primitives.ciphers import Cipher from cryptography.hazmat.primitives.ciphers import Cipher
from cryptography.hazmat.primitives.ciphers import modes from cryptography.hazmat.primitives.ciphers import modes
import pyghmi.exceptions as exc import pyghmi.exceptions as exc
from pyghmi.ipmi.private import constants from pyghmi.ipmi.private import constants
from pyghmi.ipmi.private import util from pyghmi.ipmi.private import util

View File

@@ -36,10 +36,11 @@ import string
import struct import struct
import weakref import weakref
import six
import pyghmi.constants as const import pyghmi.constants as const
import pyghmi.exceptions as exc import pyghmi.exceptions as exc
import pyghmi.ipmi.private.constants as ipmiconst import pyghmi.ipmi.private.constants as ipmiconst
import six
try: try:
import cPickle as pickle import cPickle as pickle

View File

@@ -31,6 +31,7 @@ import sys
import time import time
from dateutil import tz from dateutil import tz
import pyghmi.constants as const import pyghmi.constants as const
import pyghmi.exceptions as exc import pyghmi.exceptions as exc
import pyghmi.redfish.oem.lookup as oem import pyghmi.redfish.oem.lookup as oem

View File

@@ -25,9 +25,10 @@ import socket
import ssl import ssl
import threading import threading
import pyghmi.exceptions as pygexc
import six import six
import pyghmi.exceptions as pygexc
try: try:
import Cookie import Cookie
import httplib import httplib

View File

@@ -11,4 +11,4 @@ stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4 testscenarios>=0.4
testtools>=2.2.0 testtools>=2.2.0
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
flake8-import-order>=0.13 # LGPLv3 flake8-import-order>=0.17.1 # LGPLv3

View File

@@ -54,6 +54,8 @@ ignore = E129,E731,W503
# H904: Delay string interpolations at logging calls # H904: Delay string interpolations at logging calls
enable-extensions=H106,H203,H204,H205,H904 enable-extensions=H106,H203,H204,H205,H904
import-order-style = pep8 import-order-style = pep8
application-import-names = pyghmi
filename = *.py
[testenv:lower-constraints] [testenv:lower-constraints]
deps = deps =