mypy: Use Python 3 type syntax in zerver/webhooks/zendesk/view.py.

This commit is contained in:
Abijith10
2017-12-25 14:57:18 +05:30
committed by Tim Abbott
parent c4420ba0c6
commit 7ed76eeb23

View File

@@ -16,9 +16,9 @@ def truncate(string: Text, length: int) -> Text:
@authenticated_rest_api_view(is_webhook=True)
@has_request_variables
def api_zendesk_webhook(request, user_profile, ticket_title=REQ(), ticket_id=REQ(),
message=REQ(), stream=REQ(default="zendesk")):
# type: (HttpRequest, UserProfile, str, str, str, str) -> HttpResponse
def api_zendesk_webhook(request: HttpRequest, user_profile: UserProfile,
ticket_title: str=REQ(), ticket_id: str=REQ(),
message: str=REQ(), stream: str=REQ(default="zendesk")) -> HttpResponse:
"""
Zendesk uses trigers with message templates. This webhook uses the
ticket_id and ticket_title to create a subject. And passes with zendesk