From 8b5b3958e1f399e52f5f8586b57f71e07745bbd2 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 29 Oct 2023 17:28:24 -0700 Subject: [PATCH] =?UTF-8?q?ruff:=20Fix=20SIM201=20Use=20`=E2=80=A6=20!=3D?= =?UTF-8?q?=20=E2=80=A6`=20instead=20of=20`not=20=E2=80=A6=20=3D=3D=20?= =?UTF-8?q?=E2=80=A6`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- zulip_bots/zulip_bots/bots/merels/libraries/mechanics.py | 2 +- zulip_bots/zulip_bots/lib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 = [