mypy: Use Python 3 type syntax in 'gitlab/view.py'.

This commit is contained in:
Xavier Cooney 2017-12-25 11:15:42 +00:00 committed by showell
parent 36b58ff6fc
commit 34aee15d63
1 changed files with 4 additions and 5 deletions

View File

@ -262,11 +262,10 @@ EVENT_FUNCTION_MAPPER = {
@api_key_only_webhook_view("Gitlab")
@has_request_variables
def api_gitlab_webhook(request, user_profile,
stream=REQ(default='gitlab'),
payload=REQ(argument_type='body'),
branches=REQ(default=None)):
# type: (HttpRequest, UserProfile, Text, Dict[str, Any], Optional[Text]) -> HttpResponse
def api_gitlab_webhook(request: HttpRequest, user_profile: UserProfile,
stream: Text=REQ(default='gitlab'),
payload: Dict[str, Any]=REQ(argument_type='body'),
branches: Optional[Text]=REQ(default=None)) -> HttpResponse:
event = get_event(request, payload, branches)
if event is not None:
body = get_body_based_on_event(event)(payload)