Add websocket type hints in components (#80533)

This commit is contained in:
epenet 2022-10-19 04:15:23 +02:00 committed by GitHub
parent eca45f9dd0
commit 60640b4436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 20 deletions

View file

@ -195,7 +195,11 @@ def websocket_list(hass, connection, msg):
}
)
@websocket_api.async_response
async def websocket_handle(hass, connection, msg):
async def websocket_handle(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
msg: dict[str, Any],
) -> None:
"""Handle an incoming webhook via the WS API."""
request = MockRequest(
content=msg["body"].encode("utf-8"),