More helpers type improvements (#30145)
This commit is contained in:
parent
70f8bfbd4f
commit
868eb3c735
5 changed files with 124 additions and 90 deletions
|
@ -12,8 +12,7 @@ from homeassistant.loader import bind_hass
|
|||
|
||||
from .typing import HomeAssistantType
|
||||
|
||||
# mypy: allow-untyped-calls, allow-untyped-defs
|
||||
# mypy: no-check-untyped-defs, no-warn-return-any
|
||||
# mypy: allow-untyped-calls, allow-untyped-defs, no-check-untyped-defs
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
_UNDEF = object()
|
||||
|
@ -71,10 +70,11 @@ def format_mac(mac: str) -> str:
|
|||
class DeviceRegistry:
|
||||
"""Class to hold a registry of devices."""
|
||||
|
||||
def __init__(self, hass):
|
||||
devices: Dict[str, DeviceEntry]
|
||||
|
||||
def __init__(self, hass: HomeAssistantType) -> None:
|
||||
"""Initialize the device registry."""
|
||||
self.hass = hass
|
||||
self.devices = None
|
||||
self._store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
|
||||
|
||||
@callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue