ruff: Fix SIM103 Return the condition directly.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-10-29 17:09:23 -07:00
parent 58a3026f37
commit 6a4ad8861b
2 changed files with 4 additions and 8 deletions

View file

@ -570,10 +570,9 @@ def can_take_mode(topic_name, merels_storage):
updated_hill_uid = get_hills_numbers(updated_grid)
if current_hill_uid != updated_hill_uid and len(updated_hill_uid) >= len(current_hill_uid):
return True
else:
return False
return bool(
current_hill_uid != updated_hill_uid and len(updated_hill_uid) >= len(current_hill_uid)
)
def check_moves(turn, grid):

View file

@ -124,10 +124,7 @@ class YodaSpeakHandler:
def is_help(self, original_content: str) -> bool:
# gets rid of whitespace around the edges, so that they aren't a problem in the future
message_content = original_content.strip()
if message_content == "help":
return True
else:
return False
return message_content == "help"
handler_class = YodaSpeakHandler