mirror of https://github.com/zulip/zulip.git
mypy: Use Python 3 type syntax in `zerver/webhooks/mention/view.py`.
This commit is contained in:
parent
017476cdfb
commit
2acf3cf1d4
|
@ -13,11 +13,10 @@ from zerver.models import UserProfile
|
||||||
|
|
||||||
@api_key_only_webhook_view('Mention')
|
@api_key_only_webhook_view('Mention')
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
def api_mention_webhook(request, user_profile,
|
def api_mention_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||||
payload=REQ(argument_type='body'),
|
payload: Dict[str, Iterable[Dict[str, Any]]] = REQ(argument_type='body'),
|
||||||
stream=REQ(default='mention'),
|
stream: Text = REQ(default='mention'),
|
||||||
topic=REQ(default='news')):
|
topic: Optional[Text] = REQ(default='news')) -> HttpResponse:
|
||||||
# type: (HttpRequest, UserProfile, Dict[str, Iterable[Dict[str, Any]]], Text, Optional[Text]) -> HttpResponse
|
|
||||||
title = payload["title"]
|
title = payload["title"]
|
||||||
source_url = payload["url"]
|
source_url = payload["url"]
|
||||||
description = payload["description"]
|
description = payload["description"]
|
||||||
|
|
Loading…
Reference in New Issue