Skip to content

Commit 6a37290

Browse files
committed
ruff: Fix SIM114 Combine if branches using logical or operator.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent b009dcd commit 6a37290

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

zulip/integrations/codebase/zulip_codebase_mirror

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ def handle_event(event: Dict[str, Any]) -> None:
247247
pass
248248
elif event_type == "wiki_page":
249249
logging.warning("Wiki page notifications not yet implemented")
250-
elif event_type == "sprint_creation":
251-
logging.warning("Sprint notifications not yet implemented")
252-
elif event_type == "sprint_ended":
250+
elif event_type in ("sprint_creation", "sprint_ended"):
253251
logging.warning("Sprint notifications not yet implemented")
254252
else:
255253
logging.info("Unknown event type %s, ignoring!", event_type)

zulip_bots/zulip_bots/bots/google_search/google_search.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ def get_google_result(search_keywords: str) -> str:
5151

5252
search_keywords = search_keywords.strip()
5353

54-
if search_keywords == "help":
55-
return help_message
56-
elif search_keywords == "" or search_keywords is None:
54+
if search_keywords in ("help", ""):
5755
return help_message
5856
else:
5957
try:

0 commit comments

Comments
 (0)