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

This commit is contained in:
Abijith10
2017-12-25 14:52:56 +05:30
committed by Tim Abbott
parent d30c2463c2
commit 8a0cd1a966

View File

@@ -368,9 +368,8 @@ EVENT_FUNCTION_MAPPER = {
@api_key_only_webhook_view('GitHub')
@has_request_variables
def api_github_webhook(
request, user_profile, payload=REQ(argument_type='body'),
stream=REQ(default='github'), branches=REQ(default=None)):
# type: (HttpRequest, UserProfile, Dict[str, Any], Text, Text) -> HttpResponse
request: HttpResponse, user_profile: UserProfile, payload: Dict[str, Any]=REQ(argument_type='body'),
stream: Text=REQ(default='github'), branches: Text=REQ(default=None)) -> HttpResponse:
event = get_event(request, payload, branches)
if event is not None:
subject = get_subject_based_on_type(payload, event)