front: Fix get_body_based_on_event type.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-05-10 23:25:55 -07:00
committed by Alex Vandiver
parent 6d1b68c61b
commit 4c772989a1

View File

@@ -1,4 +1,4 @@
from typing import Any, Tuple from typing import Callable, Tuple
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
@@ -133,7 +133,7 @@ EVENT_FUNCTION_MAPPER = {
ALL_EVENT_TYPES = list(EVENT_FUNCTION_MAPPER.keys()) ALL_EVENT_TYPES = list(EVENT_FUNCTION_MAPPER.keys())
def get_body_based_on_event(event: str) -> Any: def get_body_based_on_event(event: str) -> Callable[[WildValue], str]:
return EVENT_FUNCTION_MAPPER[event] return EVENT_FUNCTION_MAPPER[event]