Fix GATT TemplateSerivce annotations

This commit is contained in:
Josh Wu
2026-01-15 12:06:05 +08:00
parent 2cad743f8c
commit 84a6453dda
6 changed files with 16 additions and 24 deletions

View File

@@ -1383,10 +1383,7 @@ class Peer:
def create_service_proxy(
self, proxy_class: type[_PROXY_CLASS]
) -> _PROXY_CLASS | None:
if proxy := proxy_class.from_client(self.gatt_client):
return cast(_PROXY_CLASS, proxy)
return None
return proxy_class.from_client(self.gatt_client)
async def discover_service_and_create_proxy(
self, proxy_class: type[_PROXY_CLASS]