ruff: Fix SIM114 Combine if branches using logical or operator.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-10-29 17:25:59 -07:00
parent b009dcd7d3
commit 6a37290cec
2 changed files with 2 additions and 6 deletions

View file

@ -247,9 +247,7 @@ def handle_event(event: Dict[str, Any]) -> None:
pass
elif event_type == "wiki_page":
logging.warning("Wiki page notifications not yet implemented")
elif event_type == "sprint_creation":
logging.warning("Sprint notifications not yet implemented")
elif event_type == "sprint_ended":
elif event_type in ("sprint_creation", "sprint_ended"):
logging.warning("Sprint notifications not yet implemented")
else:
logging.info("Unknown event type %s, ignoring!", event_type)

View file

@ -51,9 +51,7 @@ def get_google_result(search_keywords: str) -> str:
search_keywords = search_keywords.strip()
if search_keywords == "help":
return help_message
elif search_keywords == "" or search_keywords is None:
if search_keywords in ("help", ""):
return help_message
else:
try: