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

This commit is contained in:
Callum Fraser
2017-12-18 14:09:04 +00:00
committed by showell
parent 23b29212a3
commit 52f0c4472e

View File

@@ -11,10 +11,9 @@ from zerver.models import UserProfile
@api_key_only_webhook_view('IFTTT')
@has_request_variables
def api_iftt_app_webhook(request, user_profile,
payload=REQ(argument_type='body'),
stream=REQ(default='ifttt')):
# type: (HttpRequest, UserProfile, Dict[str, Any], str) -> HttpResponse
def api_iftt_app_webhook(request: HttpRequest, user_profile: UserProfile,
payload: Dict[str, Any]=REQ(argument_type='body'),
stream: str=REQ(default='ifttt')) -> HttpResponse:
subject = payload.get('subject')
content = payload.get('content')
if subject is None: