1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add slots to core EventBus (#95856)

This commit is contained in:
J. Nick Koston
2023-07-05 11:47:24 -05:00
committed by GitHub
parent 20dc9203dd
commit dc5ee71d7a
8 changed files with 217 additions and 411 deletions

View File

@@ -973,6 +973,8 @@ _FilterableJobType = tuple[
class EventBus:
"""Allow the firing of and listening for events."""
__slots__ = ("_listeners", "_match_all_listeners", "_hass")
def __init__(self, hass: HomeAssistant) -> None:
"""Initialize a new event bus."""
self._listeners: dict[str, list[_FilterableJobType]] = {}