diff --git a/tools/deploy b/tools/deploy index 6da11daa..e95e97d7 100755 --- a/tools/deploy +++ b/tools/deploy @@ -47,7 +47,7 @@ def pack(options: argparse.Namespace) -> None: zip_file_path = os.path.join(bots_dir, options.botname + ".zip") zip_file = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED) # Pack the complete bot folder - for root, dirs, files in os.walk(options.path): + for root, _dirs, files in os.walk(options.path): for file in files: file_path = os.path.join(root, file) zip_file.write(file_path, os.path.relpath(file_path, options.path)) diff --git a/zulip/integrations/zephyr/check-mirroring b/zulip/integrations/zephyr/check-mirroring index b3c039fe..995bf1dd 100755 --- a/zulip/integrations/zephyr/check-mirroring +++ b/zulip/integrations/zephyr/check-mirroring @@ -126,14 +126,14 @@ except Exception: # Subscribe to Zephyrs zephyr_subs_to_add = [] -for stream, test in test_streams: +for stream, _test in test_streams: if stream == "message": zephyr_subs_to_add.append((stream, "personal", mit_user)) else: zephyr_subs_to_add.append((stream, "*", "*")) actually_subscribed = False -for tries in range(10): +for _tries in range(10): try: zephyr_ctypes.check(zephyr_ctypes.ZInitialize()) zephyr_port = c_ushort() @@ -236,7 +236,7 @@ def receive_zephyrs() -> None: logger.info("Starting sending messages!") # Send zephyrs zsig = "Timothy Good Abbott" -for key, (stream, test) in zhkeys.items(): +for key, (stream, _test) in zhkeys.items(): if stream == "message": zwrite_args = ["zwrite", "-n", "-s", zsig, mit_user] else: @@ -261,7 +261,7 @@ receive_zephyrs() logger.info("Sent Zephyr messages!") # Send Zulips -for key, (stream, test) in hzkeys.items(): +for key, (stream, _test) in hzkeys.items(): if stream == "message": send_zulip( { diff --git a/zulip/integrations/zephyr/zephyr_mirror_backend.py b/zulip/integrations/zephyr/zephyr_mirror_backend.py index 0f620b6e..39f06c9d 100755 --- a/zulip/integrations/zephyr/zephyr_mirror_backend.py +++ b/zulip/integrations/zephyr/zephyr_mirror_backend.py @@ -960,7 +960,7 @@ def subscribed_to_mail_messages() -> bool: stored_result = os.environ.get("HUMBUG_FORWARD_MAIL_ZEPHYRS") if stored_result is not None: return stored_result == "True" - for cls, instance, recipient in parse_zephyr_subs(verbose=False): + for cls, instance, _recipient in parse_zephyr_subs(verbose=False): if cls.lower() == "mail" and instance.lower() == "inbox": os.environ["HUMBUG_FORWARD_MAIL_ZEPHYRS"] = "True" return True diff --git a/zulip_bots/zulip_bots/bots/chessbot/chessbot.py b/zulip_bots/zulip_bots/bots/chessbot/chessbot.py index e6c48cb8..2c81db14 100644 --- a/zulip_bots/zulip_bots/bots/chessbot/chessbot.py +++ b/zulip_bots/zulip_bots/bots/chessbot/chessbot.py @@ -568,7 +568,7 @@ def guide_with_numbers(board_str: str) -> str: # newline. From then on, numbers are inserted at newlines. row_list = list("8" + board_without_whitespace_str) - for i, char in enumerate(row_list): + for i, _char in enumerate(row_list): # `(i + 1) % 10 == 0` if it is the end of a row, i.e., the 10th column # since lists are 0-indexed. if (i + 1) % 10 == 0: diff --git a/zulip_bots/zulip_bots/game_handler.py b/zulip_bots/zulip_bots/game_handler.py index 51121751..cfc02997 100644 --- a/zulip_bots/zulip_bots/game_handler.py +++ b/zulip_bots/zulip_bots/game_handler.py @@ -766,7 +766,7 @@ To move subjects, send your message again, otherwise join the game using the lin def generate_game_id(self) -> str: id = "" valid_characters = "abcdefghijklmnopqrstuvwxyz0123456789" - for i in range(6): + for _i in range(6): id += valid_characters[random.randrange(0, len(valid_characters))] return id