From e7f0139f69017eed2767192a2378a7c1e25fe5b2 Mon Sep 17 00:00:00 2001 From: Marco Burstein Date: Tue, 19 Dec 2017 09:50:49 -0800 Subject: [PATCH] mypy: Use Python 3 type syntax in `zerver/webhooks/travis/view.py`. --- zerver/webhooks/travis/view.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/zerver/webhooks/travis/view.py b/zerver/webhooks/travis/view.py index 502266f689..21dd084905 100644 --- a/zerver/webhooks/travis/view.py +++ b/zerver/webhooks/travis/view.py @@ -23,16 +23,15 @@ MESSAGE_TEMPLATE = ( @api_key_only_webhook_view('Travis') @has_request_variables -def api_travis_webhook(request, user_profile, - stream=REQ(default='travis'), - topic=REQ(default=None), - ignore_pull_requests=REQ(validator=check_bool, default=True), - message=REQ('payload', validator=check_dict([ +def api_travis_webhook(request: HttpRequest, user_profile: UserProfile, + stream: str = REQ(default='travis'), + topic: str = REQ(default=None), + ignore_pull_requests: bool = REQ(validator=check_bool, default=True), + message: Dict[str, str]=REQ('payload', validator=check_dict([ ('author_name', check_string), ('status_message', check_string), ('compare_url', check_string), - ]))): - # type: (HttpRequest, UserProfile, str, str, bool, Dict[str, str]) -> HttpResponse + ]))) -> HttpResponse: message_status = message['status_message'] if ignore_pull_requests and message['type'] == 'pull_request':