From 7e14fe65ab777ca7b6418b483f204376f69870bc Mon Sep 17 00:00:00 2001 From: AZtheAsian Date: Thu, 1 Dec 2016 22:15:18 -0700 Subject: [PATCH] pep8: fix E202 violations --- api/bin/zulip-send | 2 +- bots/zephyr_mirror_backend.py | 2 +- tools/lint-all | 2 +- tools/test-tools | 2 +- zerver/models.py | 2 +- zerver/tests/test_events.py | 2 +- zerver/tests/test_messages.py | 4 ++-- zerver/tests/test_subs.py | 2 +- zilencer/error_notify.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/bin/zulip-send b/api/bin/zulip-send index 7d7d98dc76..9777848cfe 100755 --- a/api/bin/zulip-send +++ b/api/bin/zulip-send @@ -37,7 +37,7 @@ logging.basicConfig() log = logging.getLogger('zulip-send') -def do_send_message(client, message_data ): +def do_send_message(client, message_data): # type: (zulip.Client, Dict[str, Any]) -> bool '''Sends a message and optionally prints status about the same.''' diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 4492d24421..89f9b700a7 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -389,7 +389,7 @@ def process_notice(notice, log): zeph = { 'time': str(notice.time), 'sender': notice.sender, 'zsig': zsig, # logged here but not used by app - 'content': body } + 'content': body} if is_huddle: zeph['type'] = 'private' zeph['recipient'] = huddle_recipients diff --git a/tools/lint-all b/tools/lint-all index 59d6dd1a08..44184c10e2 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -82,7 +82,7 @@ def check_pep8(files): # type: (List[str]) -> bool failed = False ignored_rules = [ - 'E402', 'E501', 'W503', 'E711', 'E201', 'E202', 'E128', 'E226', + 'E402', 'E501', 'W503', 'E711', 'E201', 'E128', 'E226', 'E126', 'E121', 'E122', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303', 'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E731', 'E302', 'E129', 'E741', 'E714', 'W391', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306', diff --git a/tools/test-tools b/tools/test-tools index a2b334ea16..cd1b014813 100755 --- a/tools/test-tools +++ b/tools/test-tools @@ -29,7 +29,7 @@ if __name__ == '__main__': if args.coverage: import coverage - cov = coverage.Coverage(branch=True, omit=[ "*/zulip-venv-cache/*", dir_join(tools_test_dir, "*") ]) + cov = coverage.Coverage(branch=True, omit=[ "*/zulip-venv-cache/*", dir_join(tools_test_dir, "*")]) cov.start() suite = loader.discover(start_dir=tools_test_dir, top_level_dir=root_dir) diff --git a/zerver/models.py b/zerver/models.py index 9090a2c9b3..0b6728ed85 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -751,7 +751,7 @@ class Recipient(ModelReprMixin, models.Model): _type_names = { PERSONAL: 'personal', STREAM: 'stream', - HUDDLE: 'huddle' } + HUDDLE: 'huddle'} def type_name(self): # type: () -> str diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index 1fa90da8a9..eb3ea22d8d 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -512,7 +512,7 @@ class EventsRegisterTest(ZulipTestCase): ({'Google': True, 'Email': True, 'GitHub': True, 'LDAP': False, 'Dev': False}, {'Google': True, 'Email': True, 'GitHub': False, 'LDAP': False, 'Dev': False}, {'Google': True, 'Email': False, 'GitHub': False, 'LDAP': False, 'Dev': False}, - {'Google': True, 'Email': False, 'GitHub': True, 'LDAP': False, 'Dev': False }, + {'Google': True, 'Email': False, 'GitHub': True, 'LDAP': False, 'Dev': False}, {'Google': False, 'Email': False, 'GitHub': False, 'LDAP': False, 'Dev': True}, {'Google': False, 'Email': False, 'GitHub': True, 'LDAP': False, 'Dev': True}, {'Google': False, 'Email': True, 'GitHub': True, 'LDAP': True, 'Dev': False}): diff --git a/zerver/tests/test_messages.py b/zerver/tests/test_messages.py index e62f6d6def..cc68df9ad3 100644 --- a/zerver/tests/test_messages.py +++ b/zerver/tests/test_messages.py @@ -1006,7 +1006,7 @@ class EditMessageTest(ZulipTestCase): # type: (int, text_type, bool) -> None new_subject = 'subject' + unique_str new_content = 'content' + unique_str - params_dict = { 'message_id': id_, 'subject': new_subject } + params_dict = { 'message_id': id_, 'subject': new_subject} if not topic_only: params_dict['content'] = new_content result = self.client_post("/json/update_message", params_dict) @@ -1023,7 +1023,7 @@ class EditMessageTest(ZulipTestCase): old_content = message.content new_subject = 'subject' + unique_str new_content = 'content' + unique_str - params_dict = { 'message_id': id_, 'subject': new_subject } + params_dict = { 'message_id': id_, 'subject': new_subject} if not topic_only: params_dict['content'] = new_content result = self.client_post("/json/update_message", params_dict) diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py index 8ead61eecd..a63c11b042 100644 --- a/zerver/tests/test_subs.py +++ b/zerver/tests/test_subs.py @@ -741,7 +741,7 @@ class SubscriptionPropertiesTest(ZulipTestCase): "stream": unsubs_stream, "value": "#ffffff"}])}) self.assert_json_error( - result, "Not subscribed to stream %s" % (unsubs_stream,) ) + result, "Not subscribed to stream %s" % (unsubs_stream,)) def test_json_subscription_property_invalid_verb(self): diff --git a/zilencer/error_notify.py b/zilencer/error_notify.py index 728f3f0399..c6f23352a7 100644 --- a/zilencer/error_notify.py +++ b/zilencer/error_notify.py @@ -64,7 +64,7 @@ def zulip_browser_error(report): body = "User: %s\n" % (user_info,) body += ("Message: %(message)s\n" - % report ) + % (report)) internal_send_message(settings.ERROR_BOT, "stream", "errors", format_subject(subject), body)