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

This commit is contained in:
nyan-salmon 2017-12-24 15:10:04 +00:00 committed by showell
parent 0fd0332a2c
commit 51be0e5e76
1 changed files with 4 additions and 5 deletions

View File

@ -13,11 +13,10 @@ from zerver.models import Client, UserProfile
@api_key_only_webhook_view('SolanoLabs')
@has_request_variables
def api_solano_webhook(request, user_profile,
stream=REQ(default='solano labs'),
topic=REQ(default='build update'),
payload=REQ(argument_type='body')):
# type: (HttpRequest, UserProfile, str, str, Dict[str, Any]) -> HttpResponse
def api_solano_webhook(request: HttpRequest, user_profile: UserProfile,
stream: str=REQ(default='solano labs'),
topic: str=REQ(default='build update'),
payload: Dict[str, Any]=REQ(argument_type='body')) -> HttpResponse:
event = payload.get('event')
if event == 'test':
return handle_test_event(user_profile, request.client, stream, topic)