Fix PEP8 E121,E122,E123,E124,E125,E129 errors

E121: continuation line under-indented for hanging indent
E122: continuation line missing indentation or outdented
E123: closing bracket does not match indentation of opening bracket's line
E124: closing bracket does not match visual indentation
E125: continuation line with same indent as next logical line
E129: visually indented line with same indent as next logical line

Remove E121,E122,E123,E124,E125, & E129 from the ignore list for flake8

Change-Id: I1b98335dd24086ab0271d25d662ad667ff8c5835
This commit is contained in:
John L. Villalovos
2015-02-20 12:42:12 -08:00
parent 6044bd77a4
commit 12eedb9ae6
5 changed files with 15 additions and 19 deletions

View File

@@ -63,7 +63,7 @@ def from_response(response, message=None, traceback=None, method=None,
response.json = lambda: {'error': error_body}
if (response.headers['Content-Type'].startswith('text/') and
not hasattr(response, 'text')):
not hasattr(response, 'text')):
# NOTE(clif_h): There seems to be a case in the
# openstack.common.apiclient.exceptions module where if the
# content-type of the response is text/* then it expects

View File

@@ -186,9 +186,9 @@ class IronicShell(object):
parser.add_argument('--ironic-api-version',
default=cliutils.env(
'IRONIC_API_VERSION', default='1'),
'IRONIC_API_VERSION', default='1'),
help='Defaults to env[IRONIC_API_VERSION] '
'or 1')
'or 1')
parser.add_argument('--ironic_api_version',
help=argparse.SUPPRESS)
@@ -428,9 +428,9 @@ class IronicShell(object):
'auth_ref': None,
}
elif (args.os_username and
args.os_password and
args.os_auth_url and
(project_id or project_name)):
args.os_password and
args.os_auth_url and
(project_id or project_name)):
keystone_session = kssession.Session.load_from_cli_options(args)

View File

@@ -28,9 +28,9 @@ DRIVER1 = {'name': 'fake', 'hosts': ['fake-host1', 'fake-host2']}
DRIVER2 = {'name': 'pxe_ipminative', 'hosts': ['fake-host1', 'fake-host2']}
DRIVER2_PROPERTIES = {
"username": "username. Required.",
"password": "password. Optional.",
"address": "IP of the node. Required.",
"username": "username. Required.",
"password": "password. Optional.",
"address": "IP of the node. Required.",
}
fake_responses = {

View File

@@ -112,9 +112,7 @@ class NodeShellTest(utils.BaseTestCase):
args.driver_info = ['arg1=val1', 'arg2=val2']
n_shell.do_node_create(client_mock, args)
kwargs = {
'driver_info': {'arg1': 'val1', 'arg2': 'val2'}
}
kwargs = {'driver_info': {'arg1': 'val1', 'arg2': 'val2'}}
client_mock.node.create.assert_called_once_with(**kwargs)
def test_do_node_create_with_properties(self):
@@ -123,9 +121,7 @@ class NodeShellTest(utils.BaseTestCase):
args.properties = ['arg1=val1', 'arg2=val2']
n_shell.do_node_create(client_mock, args)
kwargs = {
'properties': {'arg1': 'val1', 'arg2': 'val2'}
}
kwargs = {'properties': {'arg1': 'val1', 'arg2': 'val2'}}
client_mock.node.create.assert_called_once_with(**kwargs)
def test_do_node_create_with_extra(self):
@@ -136,9 +132,9 @@ class NodeShellTest(utils.BaseTestCase):
n_shell.do_node_create(client_mock, args)
kwargs = {
'driver': 'driver_name',
'extra': {'arg1': 'val1', 'arg2': 'val2'}
}
'driver': 'driver_name',
'extra': {'arg1': 'val1', 'arg2': 'val2'},
}
client_mock.node.create.assert_called_once_with(**kwargs)
def test_do_node_create_with_uuid(self):

View File

@@ -29,7 +29,7 @@ commands =
commands = {posargs}
[flake8]
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129
ignore = E126,E127,E128
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools