From 238cd2b132db401a67422a4e83cf0df71b49832e Mon Sep 17 00:00:00 2001 From: Kiy4h Date: Sun, 24 Dec 2017 11:03:12 +0700 Subject: [PATCH] mypy: Use Python 3 type syntax in zerver/views/alert_words.py. --- zerver/views/alert_words.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zerver/views/alert_words.py b/zerver/views/alert_words.py index 6b9a225df6..be9ad78256 100644 --- a/zerver/views/alert_words.py +++ b/zerver/views/alert_words.py @@ -19,15 +19,15 @@ def clean_alert_words(alert_words: List[Text]) -> List[Text]: return [w for w in alert_words if w != ""] @has_request_variables -def add_alert_words(request, user_profile, - alert_words=REQ(validator=check_list(check_string), default=[])): - # type: (HttpRequest, UserProfile, List[Text]) -> HttpResponse +def add_alert_words(request: HttpRequest, user_profile: UserProfile, + alert_words: List[Text]=REQ(validator=check_list(check_string), default=[]) + ) -> HttpResponse: do_add_alert_words(user_profile, clean_alert_words(alert_words)) return json_success() @has_request_variables -def remove_alert_words(request, user_profile, - alert_words=REQ(validator=check_list(check_string), default=[])): - # type: (HttpRequest, UserProfile, List[Text]) -> HttpResponse +def remove_alert_words(request: HttpRequest, user_profile: UserProfile, + alert_words: List[Text]=REQ(validator=check_list(check_string), default=[]) + ) -> HttpResponse: do_remove_alert_words(user_profile, alert_words) return json_success()