From 53f0c5428fa4d5a4f9886d76d1974cbd86bfa224 Mon Sep 17 00:00:00 2001 From: Sergey Nikitin Date: Fri, 27 Feb 2015 16:29:30 +0300 Subject: [PATCH] Enable check for E124 rule Fix E124 failures and enable check for E124 E124 closing bracket does not match visual indentation Change-Id: Iec6af44362dcf613cfaccbccbe53de82aba51a6a --- novaclient/tests/unit/test_client.py | 6 ++---- novaclient/tests/unit/test_http.py | 3 +-- novaclient/tests/unit/v2/fakes.py | 10 +++++----- tox.ini | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/novaclient/tests/unit/test_client.py b/novaclient/tests/unit/test_client.py index 149fae7c7..8ed7cb9f3 100644 --- a/novaclient/tests/unit/test_client.py +++ b/novaclient/tests/unit/test_client.py @@ -316,12 +316,10 @@ class ClientTest(utils.TestCase): cs.http_log_debug = True cs.http_log_req('GET', '/foo', {'headers': {}}) cs.http_log_req('GET', '/foo', {'headers': - {'X-Auth-Token': 'totally_bogus'} - }) + {'X-Auth-Token': 'totally_bogus'}}) cs.http_log_req('GET', '/foo', {'headers': {'X-Foo': 'bar', - 'X-Auth-Token': 'totally_bogus'} - }) + 'X-Auth-Token': 'totally_bogus'}}) cs.http_log_req('GET', '/foo', {'headers': {}, 'data': '{"auth": {"passwordCredentials": ' diff --git a/novaclient/tests/unit/test_http.py b/novaclient/tests/unit/test_http.py index 1cebe1f07..5e676828a 100644 --- a/novaclient/tests/unit/test_http.py +++ b/novaclient/tests/unit/test_http.py @@ -97,8 +97,7 @@ class ClientTest(utils.TestCase): headers = {"X-Auth-Token": "token", "X-Auth-Project-Id": "project_id", "User-Agent": cl.USER_AGENT, - 'Accept': 'application/json', - } + 'Accept': 'application/json'} mock_request.assert_called_with( "GET", "http://example.com/hi", diff --git a/novaclient/tests/unit/v2/fakes.py b/novaclient/tests/unit/v2/fakes.py index c36713eeb..55b5bad6f 100644 --- a/novaclient/tests/unit/v2/fakes.py +++ b/novaclient/tests/unit/v2/fakes.py @@ -1359,9 +1359,9 @@ class FakeHTTPClient(base_client.HTTPClient): # def get_os_security_group_rules(self, **kw): return (200, {}, {"security_group_rules": [ - {'id': 1, 'parent_group_id': 1, 'group_id': 2, - 'ip_protocol': 'TCP', 'from_port': 22, 'to_port': 22, - 'cidr': '10.0.0.0/8'} + {'id': 1, 'parent_group_id': 1, 'group_id': 2, + 'ip_protocol': 'TCP', 'from_port': 22, 'to_port': 22, + 'cidr': '10.0.0.0/8'} ]}) def delete_os_security_group_rules_1(self, **kw): @@ -1392,8 +1392,8 @@ class FakeHTTPClient(base_client.HTTPClient): # def get_os_security_group_default_rules(self, **kw): return (200, {}, {"security_group_default_rules": [ - {'id': 1, 'ip_protocol': 'TCP', 'from_port': 22, - 'to_port': 22, 'cidr': '10.0.0.0/8'} + {'id': 1, 'ip_protocol': 'TCP', 'from_port': 22, + 'to_port': 22, 'cidr': '10.0.0.0/8'} ]}) def delete_os_security_group_default_rules_1(self, **kw): diff --git a/tox.ini b/tox.ini index 11492c8ae..f3e88641d 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ downloadcache = ~/cache/pip # Following checks are ignored on purpose. # # Additional checks are also ignored on purpose: F811, F821 -ignore = E124,F811,F821,H404,H405 +ignore = F811,F821,H404,H405 show-source = True exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py