From 2acf3cf1d4ec24d8f527d56ce2580ca4c2d68519 Mon Sep 17 00:00:00 2001 From: Marco Burstein Date: Tue, 19 Dec 2017 09:52:03 -0800 Subject: [PATCH] mypy: Use Python 3 type syntax in `zerver/webhooks/mention/view.py`. --- zerver/webhooks/mention/view.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zerver/webhooks/mention/view.py b/zerver/webhooks/mention/view.py index 123bfb07d4..fdea93bea4 100644 --- a/zerver/webhooks/mention/view.py +++ b/zerver/webhooks/mention/view.py @@ -13,11 +13,10 @@ from zerver.models import UserProfile @api_key_only_webhook_view('Mention') @has_request_variables -def api_mention_webhook(request, user_profile, - payload=REQ(argument_type='body'), - stream=REQ(default='mention'), - topic=REQ(default='news')): - # type: (HttpRequest, UserProfile, Dict[str, Iterable[Dict[str, Any]]], Text, Optional[Text]) -> HttpResponse +def api_mention_webhook(request: HttpRequest, user_profile: UserProfile, + payload: Dict[str, Iterable[Dict[str, Any]]] = REQ(argument_type='body'), + stream: Text = REQ(default='mention'), + topic: Optional[Text] = REQ(default='news')) -> HttpResponse: title = payload["title"] source_url = payload["url"] description = payload["description"]