From edaed497ed35b6fdbaf6ce589d8b4c2dd735d461 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 1 Sep 2020 17:57:15 -0700 Subject: [PATCH] lint: Remove unused ignorelongline and lint:ignore comments. Signed-off-by: Anders Kaseorg --- templates/zerver/help/bots-and-integrations.md | 2 +- tools/setup/emoji/emoji_names.py | 8 ++++---- tools/setup/emoji/import_emoji_names_from_csv | 4 ---- zerver/tests/test_push_notifications.py | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/templates/zerver/help/bots-and-integrations.md b/templates/zerver/help/bots-and-integrations.md index d4f823d2e5..5c5c29ea70 100644 --- a/templates/zerver/help/bots-and-integrations.md +++ b/templates/zerver/help/bots-and-integrations.md @@ -40,7 +40,7 @@ The **bot type** determines what the bot can do. Bot type | Permissions | Common uses ---|---|--- Incoming webhook | Send messages into Zulip | Third party integrations -Outgoing webhook | Send messages into Zulip, read messages where the bot is addressed | Third party integrations, most custom bots +Outgoing webhook | Send messages into Zulip, read messages where the bot is addressed | Third party integrations, most custom bots Generic | Anything the bot creator can do | Automating tasks, bots that listen to all messages on a stream API super bot (self-hosted only) | Anything any user can do | Mirroring diff --git a/tools/setup/emoji/emoji_names.py b/tools/setup/emoji/emoji_names.py index b7930c896c..23c007ab75 100644 --- a/tools/setup/emoji/emoji_names.py +++ b/tools/setup/emoji/emoji_names.py @@ -141,7 +141,7 @@ EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = { '1f47b': {'canonical_name': 'ghost', 'aliases': ['boo', 'spooky', 'haunted']}, '1f480': {'canonical_name': 'skull', 'aliases': []}, # alternates seemed like reasonable additions - '2620': {'canonical_name': 'skull_and_crossbones', 'aliases': ['pirate', 'death', 'hazard', 'toxic', 'poison']}, # ignorelongline + '2620': {'canonical_name': 'skull_and_crossbones', 'aliases': ['pirate', 'death', 'hazard', 'toxic', 'poison']}, # ufo seemed like a natural addition '1f47d': {'canonical_name': 'alien', 'aliases': ['ufo']}, '1f47e': {'canonical_name': 'space_invader', 'aliases': []}, @@ -327,7 +327,7 @@ EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = { # safety and invincibility inspired by # https://mashable.com/2015/10/23/ios-9-1-emoji-guide/. hard_hat and # rescue_worker seem like good additions - '26d1': {'canonical_name': 'helmet', 'aliases': ['hard_hat', 'rescue_worker', 'safety_first', 'invincible']}, # ignorelongline + '26d1': {'canonical_name': 'helmet', 'aliases': ['hard_hat', 'rescue_worker', 'safety_first', 'invincible']}, # backpack from gemoji, dominates satchel on google trends '1f392': {'canonical_name': 'backpack', 'aliases': ['satchel']}, '1f45d': {'canonical_name': 'pouch', 'aliases': []}, @@ -689,7 +689,7 @@ EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = { # Seems like the best emoji for hungry and meal. fork_and_knife_and_plate # is from gemoji/unicode, and I think is better than the shorter iamcal # version in this case. The rest just seemed like good additions. - '1f37d': {'canonical_name': 'hungry', 'aliases': ['meal', 'table_setting', 'fork_and_knife_with_plate', 'lets_eat']}, # ignorelongline + '1f37d': {'canonical_name': 'hungry', 'aliases': ['meal', 'table_setting', 'fork_and_knife_with_plate', 'lets_eat']}, # most people interested in this sport call it football '26bd': {'canonical_name': 'football', 'aliases': ['soccer']}, '1f3c0': {'canonical_name': 'basketball', 'aliases': []}, @@ -831,7 +831,7 @@ EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = { # the iamcal names '1f69a': {'canonical_name': 'moving_truck', 'aliases': []}, # see Places/11 for truck. Rest seem reasonable additions. - '1f69b': {'canonical_name': 'truck', 'aliases': ['tractor-trailer', 'big_rig', 'semi_truck', 'transport_truck']}, # ignorelongline + '1f69b': {'canonical_name': 'truck', 'aliases': ['tractor-trailer', 'big_rig', 'semi_truck', 'transport_truck']}, '1f69c': {'canonical_name': 'tractor', 'aliases': []}, # kick_scooter and scooter seem better for Places/14 and Places /16 than # scooter and motor_scooter. diff --git a/tools/setup/emoji/import_emoji_names_from_csv b/tools/setup/emoji/import_emoji_names_from_csv index cd188c47b2..cface499c6 100755 --- a/tools/setup/emoji/import_emoji_names_from_csv +++ b/tools/setup/emoji/import_emoji_names_from_csv @@ -120,10 +120,6 @@ def main() -> None: else: emoji_entry = ACTIVE_ENTRY % dict(**context) - # If an entry is longer than 120 then append - # ` # ignorelongline` to avoid lint errors. - if len(emoji_entry.split('\n')[-1]) >= 110: - emoji_entry += ' # ignorelongline' emoji_entries += emoji_entry with open(args.output_file_path, 'w') as fp: diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.py index 8385c76aff..c80d3e7c75 100644 --- a/zerver/tests/test_push_notifications.py +++ b/zerver/tests/test_push_notifications.py @@ -556,7 +556,7 @@ class AnalyticsBouncerTest(BouncerTestCase): mock_request.side_effect = self.bounce_request # Send fixture generated with Zulip 2.0 code send_to_push_bouncer('POST', 'server/analytics', { - 'realm_counts': '[{"id":1,"property":"invites_sent::day","subgroup":null,"end_time":574300800.0,"value":5,"realm":2}]', # lint:ignore + 'realm_counts': '[{"id":1,"property":"invites_sent::day","subgroup":null,"end_time":574300800.0,"value":5,"realm":2}]', 'installation_counts': '[]', 'version': '"2.0.6+git"'}) self.assertEqual(mock_request.call_count, 1)