From 93cc19e3f880a8dc6ee0dda6b9ee5e6bf8daf16c Mon Sep 17 00:00:00 2001 From: Kiy4h Date: Sun, 24 Dec 2017 11:04:37 +0700 Subject: [PATCH] mypy: Use Python 3 type syntax in zerver/webhooks/helloworld/view.py. --- zerver/webhooks/helloworld/view.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zerver/webhooks/helloworld/view.py b/zerver/webhooks/helloworld/view.py index 166d83fe76..0456457f38 100644 --- a/zerver/webhooks/helloworld/view.py +++ b/zerver/webhooks/helloworld/view.py @@ -13,10 +13,10 @@ from zerver.models import UserProfile @api_key_only_webhook_view('HelloWorld') @has_request_variables -def api_helloworld_webhook(request, user_profile, - payload=REQ(argument_type='body'), stream=REQ(default='test'), - topic=REQ(default='Hello World')): - # type: (HttpRequest, UserProfile, Dict[str, Iterable[Dict[str, Any]]], Text, Optional[Text]) -> HttpResponse +def api_helloworld_webhook(request: HttpRequest, user_profile: UserProfile, + payload: Dict[str, Iterable[Dict[str, Any]]]=REQ(argument_type='body'), + stream: Text=REQ(default='test'), + topic: Optional[Text]=REQ(default='Hello World')) -> HttpResponse: # construct the body of the message body = 'Hello! I am happy to be here! :smile:'