From bde2da7dfdf1d52482486731f32bbb89515c2a78 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 23 Jan 2017 20:39:02 -0800 Subject: [PATCH] lint: clean up PEP-8 W391 rule. --- contrib_bots/bot_lib.py | 1 - contrib_bots/bots/john/john.py | 1 - .../files/nagios_plugins/zulip_app_frontend/check_cron_file | 2 -- tools/lib/api_tests.py | 2 -- tools/lint-all | 3 +-- zerver/lib/avatar_hash.py | 1 - zerver/lib/emoji.py | 1 - zerver/management/commands/send_password_reset_email.py | 2 -- zerver/tornado/descriptors.py | 1 - zerver/views/events_register.py | 1 - zerver/views/home.py | 1 - zerver/views/invite.py | 1 - zerver/views/muting.py | 1 - 13 files changed, 1 insertion(+), 17 deletions(-) diff --git a/contrib_bots/bot_lib.py b/contrib_bots/bot_lib.py index d91b83aabf..e083068d9c 100644 --- a/contrib_bots/bot_lib.py +++ b/contrib_bots/bot_lib.py @@ -91,4 +91,3 @@ def run_message_handler_for_bot(lib_module, quiet, config_file): logging.info('starting message handling...') client.call_on_each_message(handle_message) - diff --git a/contrib_bots/bots/john/john.py b/contrib_bots/bots/john/john.py index 3856c8f11c..d68d317ecb 100644 --- a/contrib_bots/bots/john/john.py +++ b/contrib_bots/bots/john/john.py @@ -128,4 +128,3 @@ class JohnHandler(object): )) handler_class = JohnHandler - diff --git a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_cron_file b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_cron_file index 91933bfffb..273d31adb8 100755 --- a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_cron_file +++ b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_cron_file @@ -49,5 +49,3 @@ if __name__ == "__main__": print(result) exit(ret) - - diff --git a/tools/lib/api_tests.py b/tools/lib/api_tests.py index c53a3ad1f3..be854dcbe0 100644 --- a/tools/lib/api_tests.py +++ b/tools/lib/api_tests.py @@ -181,5 +181,3 @@ def test_the_api(client): test_messages(client) # print(dir(client)) - - diff --git a/tools/lint-all b/tools/lint-all index fd1523fcd8..3ac2145666 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -87,8 +87,7 @@ def check_pep8(files): # ignored. It either doesn't fit with the style of the project or should # actually be cleaned up. # - 'W391', 'W503', - + 'W503', 'E114', 'E115', 'E121', 'E123', 'E126', 'E226', 'E241', 'E261', 'E302', 'E305', 'E306', 'E401', 'E501', 'E702', 'E711', 'E712', 'E713', 'E714', 'E741', diff --git a/zerver/lib/avatar_hash.py b/zerver/lib/avatar_hash.py index e212bbf6ef..6368adc10e 100644 --- a/zerver/lib/avatar_hash.py +++ b/zerver/lib/avatar_hash.py @@ -25,4 +25,3 @@ def user_avatar_hash(email): # replacement. user_key = email.lower() + settings.AVATAR_SALT return make_safe_digest(user_key, hashlib.sha1) - diff --git a/zerver/lib/emoji.py b/zerver/lib/emoji.py index 4bfed7d8d3..5de225df28 100644 --- a/zerver/lib/emoji.py +++ b/zerver/lib/emoji.py @@ -27,4 +27,3 @@ def check_valid_emoji_name(emoji_name): if re.match('^[0-9a-zA-Z.\-_]+(? None del descriptors_by_handler_id[handler_id] - diff --git a/zerver/views/events_register.py b/zerver/views/events_register.py index c92a588012..f35bf5fa3d 100644 --- a/zerver/views/events_register.py +++ b/zerver/views/events_register.py @@ -48,4 +48,3 @@ def events_register_backend(request, user_profile, apply_markdown=True, event_types, queue_lifespan_secs, all_public_streams, narrow=narrow) return json_success(ret) - diff --git a/zerver/views/home.py b/zerver/views/home.py index 72eec9d20d..6bf710574c 100644 --- a/zerver/views/home.py +++ b/zerver/views/home.py @@ -339,4 +339,3 @@ def is_buggy_ua(agent): """ return ("Humbug Desktop/" in agent or "Zulip Desktop/" in agent or "ZulipDesktop/" in agent) and \ "Mac" not in agent - diff --git a/zerver/views/invite.py b/zerver/views/invite.py index a43cf3351b..2a863e64e6 100644 --- a/zerver/views/invite.py +++ b/zerver/views/invite.py @@ -95,4 +95,3 @@ def json_refer_friend(request, user_profile, email=REQ()): do_refer_friend(user_profile, email) return json_success() - diff --git a/zerver/views/muting.py b/zerver/views/muting.py index 714abba5e9..f778556116 100644 --- a/zerver/views/muting.py +++ b/zerver/views/muting.py @@ -18,4 +18,3 @@ def json_set_muted_topics(request, user_profile, # type: (HttpRequest, UserProfile, List[List[Text]]) -> HttpResponse do_set_muted_topics(user_profile, muted_topics) return json_success() -