Skip to content

Commit 6a4ad88

Browse files
committed
ruff: Fix SIM103 Return the condition directly.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 58a3026 commit 6a4ad88

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

zulip_bots/zulip_bots/bots/merels/libraries/mechanics.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,9 @@ def can_take_mode(topic_name, merels_storage):
570570

571571
updated_hill_uid = get_hills_numbers(updated_grid)
572572

573-
if current_hill_uid != updated_hill_uid and len(updated_hill_uid) >= len(current_hill_uid):
574-
return True
575-
else:
576-
return False
573+
return bool(
574+
current_hill_uid != updated_hill_uid and len(updated_hill_uid) >= len(current_hill_uid)
575+
)
577576

578577

579578
def check_moves(turn, grid):

zulip_bots/zulip_bots/bots/yoda/yoda.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ def send_message(
124124
def is_help(self, original_content: str) -> bool:
125125
# gets rid of whitespace around the edges, so that they aren't a problem in the future
126126
message_content = original_content.strip()
127-
if message_content == "help":
128-
return True
129-
else:
130-
return False
127+
return message_content == "help"
131128

132129

133130
handler_class = YodaSpeakHandler

0 commit comments

Comments
 (0)