From 403ea486e4549e2a7cdd791f891d07b638860a80 Mon Sep 17 00:00:00 2001 From: Callum Fraser Date: Mon, 18 Dec 2017 14:08:41 +0000 Subject: [PATCH] mypy: Use Python 3 type syntax in zerver/webhooks/gogs/view.py. --- zerver/webhooks/gogs/view.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zerver/webhooks/gogs/view.py b/zerver/webhooks/gogs/view.py index b3156ccbeb..0ae70ce225 100644 --- a/zerver/webhooks/gogs/view.py +++ b/zerver/webhooks/gogs/view.py @@ -61,11 +61,10 @@ def format_pull_request_event(payload: Dict[str, Any]) -> Text: @api_key_only_webhook_view('Gogs') @has_request_variables -def api_gogs_webhook(request, user_profile, - payload=REQ(argument_type='body'), - stream=REQ(default='commits'), - branches=REQ(default=None)): - # type: (HttpRequest, UserProfile, Dict[str, Any], Text, Optional[Text]) -> HttpResponse +def api_gogs_webhook(request: HttpRequest, user_profile: UserProfile, + payload: Dict[str, Any]=REQ(argument_type='body'), + stream: Text=REQ(default='commits'), + branches: Optional[Text]=REQ(default=None)) -> HttpResponse: repo = payload['repository']['name'] event = request.META['HTTP_X_GOGS_EVENT']