diff --git a/openstackclient/common/restapi.py b/openstackclient/common/restapi.py index 1bb64fae03..f20ad23dd2 100644 --- a/openstackclient/common/restapi.py +++ b/openstackclient/common/restapi.py @@ -251,16 +251,6 @@ class RESTApi(object): else: return response.json() - ###hack this for keystone!!! - #data = body[response_key] - # NOTE(ja): keystone returns values as list as {'values': [ ... ]} - # unlike other services which just return the list... - #if isinstance(data, dict): - # try: - # data = data['values'] - # except KeyError: - # pass - def set(self, url, data=None, response_key=None, **kwargs): """Update an object via a PUT request diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index f75444f2f1..2dcc7ae9a0 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -693,7 +693,7 @@ class MigrateServer(command.Command): if utils.wait_for_status( compute_client.servers.get, server.id, - #callback=_show_progress, + callback=_show_progress, ): sys.stdout.write('Complete\n') else: diff --git a/openstackclient/tests/common/test_restapi.py b/openstackclient/tests/common/test_restapi.py index 291818c108..d4fe2d3db1 100644 --- a/openstackclient/tests/common/test_restapi.py +++ b/openstackclient/tests/common/test_restapi.py @@ -137,10 +137,6 @@ class TestRESTApi(utils.TestCase): user_agent=fake_user_agent, ) gopher = api.request('GET', fake_url) - #session_mock.return_value.headers.setdefault.assert_called_with( - # 'X-Auth-Token', - # fake_auth, - #) session_mock.return_value.request.assert_called_with( 'GET', fake_url, diff --git a/openstackclient/tests/identity/v3/fakes.py b/openstackclient/tests/identity/v3/fakes.py index 711a423d25..8143409df5 100644 --- a/openstackclient/tests/identity/v3/fakes.py +++ b/openstackclient/tests/identity/v3/fakes.py @@ -114,7 +114,8 @@ IDENTITY_PROVIDER = { 'description': idp_description } -#Assignments +# Assignments + ASSIGNMENT_WITH_PROJECT_ID_AND_USER_ID = { 'scope': {'project': {'id': project_id}}, 'user': {'id': user_id}, diff --git a/openstackclient/tests/volume/v1/test_volume.py b/openstackclient/tests/volume/v1/test_volume.py index d881598af3..cb006b1086 100644 --- a/openstackclient/tests/volume/v1/test_volume.py +++ b/openstackclient/tests/volume/v1/test_volume.py @@ -220,7 +220,6 @@ class TestVolumeCreate(TestVolume): None, None, volume_fakes.volume_name, - #volume_fakes.volume_description, None, None, identity_fakes.user_id, @@ -296,7 +295,6 @@ class TestVolumeCreate(TestVolume): None, None, volume_fakes.volume_name, - #volume_fakes.volume_description, None, None, identity_fakes.user_id, diff --git a/tox.ini b/tox.ini index 95f00cdf8d..a8bb1be659 100644 --- a/tox.ini +++ b/tox.ini @@ -28,6 +28,6 @@ commands= python setup.py build_sphinx [flake8] -ignore = E126,E202,W602,H302,H402,E265,H305,H307,H904 +ignore = E126,E202,W602,H302,H402,H305,H307,H904 show-source = True exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools