From 4fda55aba0cf3f7eb0519c1179117657ce4d74c7 Mon Sep 17 00:00:00 2001 From: pifou Date: Mon, 26 Oct 2020 23:19:52 +0100 Subject: [PATCH] fix mypy errors --- wideq/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wideq/client.py b/wideq/client.py index 77e2ecc..fddd97b 100644 --- a/wideq/client.py +++ b/wideq/client.py @@ -265,7 +265,7 @@ class DeviceInfo(object): DeviceType.DRYER : DryerDevice, DeviceType.WASHER : WasherDevice, """ - mapping = dict() + mapping : dict[DeviceType, Device] = {} def __init__(self, data: Dict[str, Any]) -> None: self.data = data @@ -296,9 +296,9 @@ class DeviceInfo(object): """Load JSON data describing the model's capabilities. """ return requests.get(self.model_info_url).json() - + def load_object(self): - """Load the registered subclasse Device object according to his type + """Load the registered subclasse Device object according to his type """ if self.type in DeviceInfo.mapping: return DeviceInfo.mapping.get(self.type)