mirror of https://github.com/zulip/zulip.git
mypy: Use Python 3 type syntax in 'gitlab/view.py'.
This commit is contained in:
parent
36b58ff6fc
commit
34aee15d63
|
@ -262,11 +262,10 @@ EVENT_FUNCTION_MAPPER = {
|
||||||
|
|
||||||
@api_key_only_webhook_view("Gitlab")
|
@api_key_only_webhook_view("Gitlab")
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
def api_gitlab_webhook(request, user_profile,
|
def api_gitlab_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||||
stream=REQ(default='gitlab'),
|
stream: Text=REQ(default='gitlab'),
|
||||||
payload=REQ(argument_type='body'),
|
payload: Dict[str, Any]=REQ(argument_type='body'),
|
||||||
branches=REQ(default=None)):
|
branches: Optional[Text]=REQ(default=None)) -> HttpResponse:
|
||||||
# type: (HttpRequest, UserProfile, Text, Dict[str, Any], Optional[Text]) -> HttpResponse
|
|
||||||
event = get_event(request, payload, branches)
|
event = get_event(request, payload, branches)
|
||||||
if event is not None:
|
if event is not None:
|
||||||
body = get_body_based_on_event(event)(payload)
|
body = get_body_based_on_event(event)(payload)
|
||||||
|
|
Loading…
Reference in New Issue