Update typing 14 (#48078)

This commit is contained in:
Marc Mueller 2021-03-18 15:08:35 +01:00 committed by GitHub
parent 7d196abc4a
commit dcca29ef68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 614 additions and 521 deletions

View file

@ -1,8 +1,9 @@
"""View to accept incoming websocket connection."""
from __future__ import annotations
import asyncio
from contextlib import suppress
import logging
from typing import Optional
from aiohttp import WSMsgType, web
import async_timeout
@ -57,7 +58,7 @@ class WebSocketHandler:
"""Initialize an active connection."""
self.hass = hass
self.request = request
self.wsock: Optional[web.WebSocketResponse] = None
self.wsock: web.WebSocketResponse | None = None
self._to_write: asyncio.Queue = asyncio.Queue(maxsize=MAX_PENDING_MSG)
self._handle_task = None
self._writer_task = None