From e9344077fc5d7957de26a360066eadc1c4d02af7 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Thu, 16 Mar 2017 07:08:21 -0700 Subject: [PATCH] flake8: Specify 'ironic_python_agent' as name of app Specify 'ironic_python_agent' as the name of the application for the flake8-import-order plugin. That way it knows that imports of ironic_python_agent should come after external libraries. Change-Id: Id39d558a51aeb97d96633afea28676634547d0d7 --- ironic_python_agent/extensions/standby.py | 2 +- ironic_python_agent/hardware_managers/mlnx.py | 3 ++- ironic_python_agent/tests/unit/extensions/test_iscsi.py | 2 +- ironic_python_agent/tests/unit/extensions/test_log.py | 3 +-- tox.ini | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ironic_python_agent/extensions/standby.py b/ironic_python_agent/extensions/standby.py index 7f351febb..78c562ace 100644 --- a/ironic_python_agent/extensions/standby.py +++ b/ironic_python_agent/extensions/standby.py @@ -16,13 +16,13 @@ import hashlib import os import time +from ironic_lib import disk_utils from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log import requests import six -from ironic_lib import disk_utils from ironic_python_agent import errors from ironic_python_agent.extensions import base from ironic_python_agent import hardware diff --git a/ironic_python_agent/hardware_managers/mlnx.py b/ironic_python_agent/hardware_managers/mlnx.py index c8f4dd78c..d79aa8d10 100644 --- a/ironic_python_agent/hardware_managers/mlnx.py +++ b/ironic_python_agent/hardware_managers/mlnx.py @@ -13,10 +13,11 @@ # limitations under the License. import os +from oslo_log import log + from ironic_python_agent import errors from ironic_python_agent import hardware from ironic_python_agent import netutils -from oslo_log import log LOG = log.getLogger() # Mellanox NIC Vendor ID diff --git a/ironic_python_agent/tests/unit/extensions/test_iscsi.py b/ironic_python_agent/tests/unit/extensions/test_iscsi.py index 7611c2b17..086de2a03 100644 --- a/ironic_python_agent/tests/unit/extensions/test_iscsi.py +++ b/ironic_python_agent/tests/unit/extensions/test_iscsi.py @@ -15,10 +15,10 @@ import mock +from ironic_lib import disk_utils from oslo_concurrency import processutils from oslotest import base as test_base -from ironic_lib import disk_utils from ironic_python_agent import errors from ironic_python_agent.extensions import iscsi from ironic_python_agent import hardware diff --git a/ironic_python_agent/tests/unit/extensions/test_log.py b/ironic_python_agent/tests/unit/extensions/test_log.py index ff90b9144..147d5d4bf 100644 --- a/ironic_python_agent/tests/unit/extensions/test_log.py +++ b/ironic_python_agent/tests/unit/extensions/test_log.py @@ -14,11 +14,10 @@ # under the License. import mock - -from ironic_python_agent import utils from oslotest import base as test_base from ironic_python_agent.extensions import log +from ironic_python_agent import utils class TestLogExtension(test_base.BaseTestCase): diff --git a/tox.ini b/tox.ini index 0322d875c..af9e22407 100644 --- a/tox.ini +++ b/tox.ini @@ -62,6 +62,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen ignore = E129 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,imagebuild/tinyipa/tinyipafinal,imagebuild/tinyipa/tinyipabuild import-order-style = pep8 +application-import-names = ironic_python_agent # [H106] Don’t put vim configuration in source files. # [H203] Use assertIs(Not)None to check for None. # [H904] Delay string interpolations at logging calls.