diff --git a/ironicclient/exc.py b/ironicclient/exc.py index 88b6b084f..a1d04176e 100644 --- a/ironicclient/exc.py +++ b/ironicclient/exc.py @@ -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 diff --git a/ironicclient/shell.py b/ironicclient/shell.py index 137c6498b..c9ec34106 100644 --- a/ironicclient/shell.py +++ b/ironicclient/shell.py @@ -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) diff --git a/ironicclient/tests/v1/test_driver.py b/ironicclient/tests/v1/test_driver.py index dcba0e55b..5b446b865 100644 --- a/ironicclient/tests/v1/test_driver.py +++ b/ironicclient/tests/v1/test_driver.py @@ -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 = { diff --git a/ironicclient/tests/v1/test_node_shell.py b/ironicclient/tests/v1/test_node_shell.py index 92dff5419..cf267c1ad 100644 --- a/ironicclient/tests/v1/test_node_shell.py +++ b/ironicclient/tests/v1/test_node_shell.py @@ -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): diff --git a/tox.ini b/tox.ini index 4f12db3d3..6b272088d 100644 --- a/tox.ini +++ b/tox.ini @@ -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