ruff: Fix SIM201 Use … != … instead of not … == ….

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-10-29 17:28:24 -07:00
parent 93156d994a
commit 8b5b3958e1
2 changed files with 2 additions and 2 deletions

View file

@ -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 the man is in inner square, the distance must be only 1
if [vpos_before, hpos_before] in constants.INNER_SQUARE: if [vpos_before, hpos_before] in constants.INNER_SQUARE:
return not (distance == 1) return distance != 1
def get_hills_numbers(grid): def get_hills_numbers(grid):

View file

@ -405,7 +405,7 @@ def is_private_message_but_not_group_pm(
zulip/zulip project, so refactor with care. See the comments in zulip/zulip project, so refactor with care. See the comments in
extract_query_without_mention. extract_query_without_mention.
""" """
if not message_dict["type"] == "private": if message_dict["type"] != "private":
return False return False
is_message_from_self = current_user.user_id == message_dict["sender_id"] is_message_from_self = current_user.user_id == message_dict["sender_id"]
recipients = [ recipients = [