diff --git a/zulip_bots/zulip_bots/bots/merels/libraries/mechanics.py b/zulip_bots/zulip_bots/bots/merels/libraries/mechanics.py index 4ef9c3b6..eca4e1d5 100644 --- a/zulip_bots/zulip_bots/bots/merels/libraries/mechanics.py +++ b/zulip_bots/zulip_bots/bots/merels/libraries/mechanics.py @@ -64,7 +64,7 @@ def is_jump(vpos_before, hpos_before, vpos_after, hpos_after): # If the man is in inner square, the distance must be only 1 if [vpos_before, hpos_before] in constants.INNER_SQUARE: - return not (distance == 1) + return distance != 1 def get_hills_numbers(grid): diff --git a/zulip_bots/zulip_bots/lib.py b/zulip_bots/zulip_bots/lib.py index 895ba669..e7238843 100644 --- a/zulip_bots/zulip_bots/lib.py +++ b/zulip_bots/zulip_bots/lib.py @@ -405,7 +405,7 @@ def is_private_message_but_not_group_pm( zulip/zulip project, so refactor with care. See the comments in extract_query_without_mention. """ - if not message_dict["type"] == "private": + if message_dict["type"] != "private": return False is_message_from_self = current_user.user_id == message_dict["sender_id"] recipients = [