From 529786de439a3e1bc99a7efa19f8cf55c9d39519 Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Thu, 29 Apr 2021 00:52:57 +0200 Subject: [PATCH] style(typing): fix typing for defaultdicts --- apps/controllerx/cx_core/controller.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/controllerx/cx_core/controller.py b/apps/controllerx/cx_core/controller.py index 71bba922..194df72a 100644 --- a/apps/controllerx/cx_core/controller.py +++ b/apps/controllerx/cx_core/controller.py @@ -11,6 +11,7 @@ Awaitable, Callable, Counter, + DefaultDict, Dict, List, Optional, @@ -85,7 +86,7 @@ class Controller(Hass, Mqtt): integration: Integration actions_mapping: ActionsMapping - action_handles: Dict[ActionEvent, Optional[Future]] + action_handles: DefaultDict[ActionEvent, Optional["Future[None]"]] action_delay_handles: Dict[ActionEvent, Optional[float]] multiple_click_actions: Set[ActionEvent] action_delay: Dict[ActionEvent, int] @@ -93,7 +94,9 @@ class Controller(Hass, Mqtt): action_times: Dict[str, float] multiple_click_action_times: Dict[str, float] click_counter: Counter[ActionEvent] - multiple_click_action_delay_tasks: Dict[ActionEvent, Optional[Future]] + multiple_click_action_delay_tasks: DefaultDict[ + ActionEvent, Optional["Future[None]"] + ] multiple_click_delay: int async def initialize(self) -> None: