ruff: Fix SIM103 Return the condition directly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
58a3026f37
commit
6a4ad8861b
2 changed files with 4 additions and 8 deletions
|
@ -570,10 +570,9 @@ def can_take_mode(topic_name, merels_storage):
|
||||||
|
|
||||||
updated_hill_uid = get_hills_numbers(updated_grid)
|
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 bool(
|
||||||
return True
|
current_hill_uid != updated_hill_uid and len(updated_hill_uid) >= len(current_hill_uid)
|
||||||
else:
|
)
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def check_moves(turn, grid):
|
def check_moves(turn, grid):
|
||||||
|
|
|
@ -124,10 +124,7 @@ class YodaSpeakHandler:
|
||||||
def is_help(self, original_content: str) -> bool:
|
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
|
# gets rid of whitespace around the edges, so that they aren't a problem in the future
|
||||||
message_content = original_content.strip()
|
message_content = original_content.strip()
|
||||||
if message_content == "help":
|
return message_content == "help"
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
handler_class = YodaSpeakHandler
|
handler_class = YodaSpeakHandler
|
||||||
|
|
Loading…
Add table
Reference in a new issue