mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
mypy: Use Python 3 type syntax in zerver/webhooks/homeassistant/view.py.
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user