typing: Fix function signatures.

This fixes mypy errors for function signatures discovered with
django-stubs.
This commit is contained in:
PIG208
2021-08-19 16:45:20 +08:00
committed by Tim Abbott
parent 71427239d0
commit 3b11c36ed9
7 changed files with 14 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
from django.http import HttpRequest
from django.http.response import HttpResponse
from django.utils.translation import gettext as _
from zerver.decorator import webhook_view
@@ -22,7 +23,7 @@ def api_slack_webhook(
channel_name: str = REQ(),
stream: str = REQ(default="slack"),
channels_map_to_topics: str = REQ(default="1"),
) -> HttpRequest:
) -> HttpResponse:
if channels_map_to_topics not in list(VALID_OPTIONS.values()):
raise JsonableError(_("Error: channels_map_to_topics parameter other than 0 or 1"))