Add I202 to flake ignore list

Pep8 job currently fails complaining about I202 in a bunch of
modules. This change fixes the genuine errors in the module
import order, and adds I202 to the skip list so that we don't
have to add noqa comments everywhere we can not satisfy the
check. After we split out the tempest plugin, we'll remove
I202 from the ignore list and add noqa comments in the places
where it will still be needed.

Change-Id: Ia170a41d35dea8c9eda2b36c907dbc518169a824
This commit is contained in:
Vladyslav Drok 2017-10-25 12:59:07 +03:00
parent 50ed0b1f0f
commit e0514cb85b
19 changed files with 10 additions and 28 deletions

View File

@ -15,10 +15,8 @@ Hardware types for Cisco UCS Servers
"""
from ironic.drivers import ipmi
from ironic.drivers.modules.cimc import management as cimc_mgmt
from ironic.drivers.modules.cimc import power as cimc_power
from ironic.drivers.modules.ucs import management as ucs_mgmt
from ironic.drivers.modules.ucs import power as ucs_power

View File

@ -15,10 +15,9 @@
"""
Common functionalities shared between different iRMC modules.
"""
import six
from oslo_log import log as logging
from oslo_utils import importutils
import six
from ironic.common import exception
from ironic.common.i18n import _

View File

@ -20,12 +20,11 @@ from oslo_utils import importutils
from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.conf import CONF
from ironic.drivers.modules import inspector
from ironic.drivers.modules.oneview import common
from ironic.drivers.modules.oneview import deploy_utils
from ironic.conf import CONF
METRICS = metrics_utils.get_metrics_logger(__name__)
oneview_exception = importutils.try_import('oneview_client.exceptions')

View File

@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import retrying
from oslo_config import cfg
from oslo_log import log
from oslo_utils import excutils
from oslo_utils import strutils
import retrying
from ironic.common import cinder
from ironic.common import exception

View File

@ -11,7 +11,6 @@
# under the License.
import mock
from oslo_config import cfg
from osprofiler import web

View File

@ -13,7 +13,6 @@
"""Tests for manipulating NodeTags via the DB API"""
from ironic.common import exception
from ironic.tests.unit.db import base
from ironic.tests.unit.db import utils as db_utils

View File

@ -15,7 +15,6 @@
# under the License.
import mock
from neutronclient.common import exceptions as neutron_client_exc
from oslo_utils import uuidutils

View File

@ -13,7 +13,6 @@
# limitations under the License.
import mock
from oslo_config import cfg
from oslo_utils import importutils
from oslo_utils import uuidutils

View File

@ -13,7 +13,6 @@
# limitations under the License.
import mock
from oslo_utils import importutils
from six.moves import http_client

View File

@ -13,7 +13,6 @@
# limitations under the License.
import mock
from oslo_config import cfg
from oslo_utils import importutils

View File

@ -45,7 +45,6 @@ from ironic.tests.unit.db import utils as db_utils
from ironic.tests.unit.drivers import third_party_driver_mock_specs \
as mock_specs
from ironic.tests.unit.objects import utils as obj_utils
if six.PY3:
import io
file = io.BytesIO

View File

@ -17,7 +17,6 @@ Test class for common methods used by iRMC modules.
"""
import mock
from oslo_config import cfg
from ironic.common import exception

View File

@ -17,7 +17,6 @@ Test class for iRMC Power Driver
"""
import mock
from oslo_utils import uuidutils
from ironic.common import exception

View File

@ -14,7 +14,6 @@
# under the License.
import mock
from oslo_utils import importutils
from ironic.common import driver_factory

View File

@ -12,19 +12,17 @@
from ironic.conductor import task_manager
from ironic.drivers.modules import agent
from ironic.drivers.modules.cimc import management as cimc_mgmt
from ironic.drivers.modules.cimc import power as cimc_power
from ironic.drivers.modules import ipmitool
from ironic.drivers.modules import iscsi_deploy
from ironic.drivers.modules import noop
from ironic.drivers.modules import pxe
from ironic.drivers.modules.storage import noop as noop_storage
from ironic.tests.unit.db import base as db_base
from ironic.tests.unit.objects import utils as obj_utils
from ironic.drivers.modules.cimc import management as cimc_mgmt
from ironic.drivers.modules.cimc import power as cimc_power
from ironic.drivers.modules.ucs import management as ucs_mgmt
from ironic.drivers.modules.ucs import power as ucs_power
from ironic.tests.unit.db import base as db_base
from ironic.tests.unit.objects import utils as obj_utils
class CiscoUCSStandaloneHardwareTestCase(db_base.DbTestCase):

View File

@ -15,7 +15,6 @@
import inspect
import mock
from oslo_utils import importutils
from ironic.common import exception

View File

@ -23,7 +23,6 @@ import subprocess
from oslo_log import log
from oslo_utils import netutils
from tempest.common import compute
from tempest.common.utils.linux import remote_client
from tempest.common.utils import net_utils

View File

@ -11,7 +11,6 @@
# under the License.
import six
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators

View File

@ -98,7 +98,9 @@ setenv = PYTHONHASHSEED=0
commands = {posargs}
[flake8]
ignore = E129
# TODO(vdrok): Remove I202 from ignore list when we split out
# the tempest plugin
ignore = E129,I202
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import-order-style = pep8
application-import-names = ironic