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

This commit is contained in:
picapi_
2017-12-05 17:42:20 +00:00
committed by showell
parent c2ef7e7ce5
commit d55d680758

View File

@@ -12,10 +12,9 @@ from zerver.models import UserProfile
@api_key_only_webhook_view('HomeAssistant')
@has_request_variables
def api_homeassistant_webhook(request, user_profile,
payload=REQ(argument_type='body'),
stream=REQ(default="homeassistant")):
# type: (HttpRequest, UserProfile, Dict[str, str], Text) -> HttpResponse
def api_homeassistant_webhook(request: HttpRequest, user_profile: UserProfile,
payload: Dict[str, str]=REQ(argument_type='body'),
stream: Text=REQ(default="homeassistant")) -> HttpResponse:
# construct the body of the message
body = payload["message"]