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 5ae5fe45ff
commit 6c592ce974
110 changed files with 507 additions and 507 deletions

View File

@@ -4,7 +4,7 @@ from django.core.exceptions import ValidationError
from django.http import HttpRequest, HttpResponse
from zerver.decorator import webhook_view
from zerver.lib.exceptions import UnsupportedWebhookEventType
from zerver.lib.exceptions import UnsupportedWebhookEventTypeError
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.validator import WildValue, check_string, to_wild_value
@@ -55,7 +55,7 @@ def get_event_name(payload: WildValue, branches: Optional[str]) -> Optional[str]
return None
if event_name in EVENT_FUNCTION_MAPPER:
return event_name
raise UnsupportedWebhookEventType(event_name)
raise UnsupportedWebhookEventTypeError(event_name)
def get_repository_name(payload: WildValue) -> str: