From c55685063f77b715dcc35d172a2a494e78af2014 Mon Sep 17 00:00:00 2001 From: Callum Fraser Date: Mon, 18 Dec 2017 14:08:14 +0000 Subject: [PATCH] mypy: Use Python 3 type syntax in zerver/webhooks/appfollow/view.py. --- zerver/webhooks/appfollow/view.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zerver/webhooks/appfollow/view.py b/zerver/webhooks/appfollow/view.py index 95c3d557d4..95b64dc212 100644 --- a/zerver/webhooks/appfollow/view.py +++ b/zerver/webhooks/appfollow/view.py @@ -13,9 +13,10 @@ from zerver.models import UserProfile @api_key_only_webhook_view("AppFollow") @has_request_variables -def api_appfollow_webhook(request, user_profile, stream=REQ(default="appfollow"), - topic=REQ(default=None), payload=REQ(argument_type="body")): - # type: (HttpRequest, UserProfile, Text, Optional[Text], Dict[str, Any]) -> HttpResponse +def api_appfollow_webhook(request: HttpRequest, user_profile: UserProfile, + stream: Text=REQ(default="appfollow"), + topic: Optional[Text]=REQ(default=None), + payload: Dict[str, Any]=REQ(argument_type="body")) -> HttpResponse: message = payload["text"] app_name = re.search('\A(.+)', message).group(0) if topic is None: