Enable mypy checks for homekit_controller (#65358)

This commit is contained in:
Jc2k 2022-02-01 11:27:35 +00:00 committed by GitHub
parent ab17f8984b
commit dd5bcafab7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 18 deletions

View file

@ -280,9 +280,13 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
if self.controller is None:
await self._async_setup_controller()
# mypy can't see that self._async_setup_controller() always sets self.controller or throws
assert self.controller
pairing = self.controller.load_pairing(
existing.data["AccessoryPairingID"], dict(existing.data)
)
try:
await pairing.list_accessories_and_characteristics()
except AuthenticationError: