ruff: Fix N818 exception name should be named with an Error suffix.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-11-17 00:30:48 -08:00
committed by Tim Abbott
parent eb2c822d3f
commit 73c4da7974
110 changed files with 507 additions and 507 deletions

View File

@@ -58,11 +58,11 @@ class StateHandler:
return is_key_in_bot_storage(self.user_profile, key)
class EmbeddedBotQuitException(Exception):
class EmbeddedBotQuitError(Exception):
pass
class EmbeddedBotEmptyRecipientsList(Exception):
class EmbeddedBotEmptyRecipientsListError(Exception):
pass
@@ -102,7 +102,7 @@ class EmbeddedBotHandler:
recipients = ",".join(message["to"]).split(",")
if len(message["to"]) == 0:
raise EmbeddedBotEmptyRecipientsList(_("Message must have recipients!"))
raise EmbeddedBotEmptyRecipientsListError(_("Message must have recipients!"))
elif len(message["to"]) == 1:
recipient_user = get_active_user(recipients[0], self.user_profile.realm)
message_id = internal_send_private_message(
@@ -151,4 +151,4 @@ class EmbeddedBotHandler:
raise
def quit(self, message: str = "") -> None:
raise EmbeddedBotQuitException(message)
raise EmbeddedBotQuitError(message)