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') @api_key_only_webhook_view('SolanoLabs')
@has_request_variables @has_request_variables
def api_solano_webhook(request, user_profile, def api_solano_webhook(request: HttpRequest, user_profile: UserProfile,
stream=REQ(default='solano labs'), stream: str=REQ(default='solano labs'),
topic=REQ(default='build update'), topic: str=REQ(default='build update'),
payload=REQ(argument_type='body')): payload: Dict[str, Any]=REQ(argument_type='body')) -> HttpResponse:
# type: (HttpRequest, UserProfile, str, str, Dict[str, Any]) -> HttpResponse
event = payload.get('event') event = payload.get('event')
if event == 'test': if event == 'test':
return handle_test_event(user_profile, request.client, stream, topic) return handle_test_event(user_profile, request.client, stream, topic)