Fix mypy issues in backups and dbus (#5792)

* Fix mypy issues in backups module

* Fix mypy issues in dbus module

* Fix mypy issues in api after rebase

* TypedDict to dataclass and other small fixes

* Finish fixing mypy errors in dbus

* local_where must exist

* Fix references to name in tests
This commit is contained in:
Mike Degatano
2025-03-31 17:03:54 -04:00
committed by GitHub
parent 67b9a44160
commit 01a682cfaa
48 changed files with 683 additions and 420 deletions

View File

@@ -6,7 +6,7 @@ from contextlib import asynccontextmanager
import logging
import aiohttp
from aiohttp import WSMessageTypeError, web
from aiohttp import WSCloseCode, WSMessageTypeError, web
from aiohttp.client_exceptions import ClientConnectorError
from aiohttp.client_ws import ClientWebSocketResponse
from aiohttp.hdrs import AUTHORIZATION, CONTENT_TYPE
@@ -205,7 +205,9 @@ class APIProxy(CoreSysAttributes):
logger.warning(
"Error WebSocket message received while proxying: %r", msg.data
)
await target.close(code=source.close_code)
await target.close(
code=source.close_code or WSCloseCode.INTERNAL_ERROR
)
case _:
logger.warning(
"Cannot proxy WebSocket message of unsupported type: %r",