1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-16 07:10:09 -07:00

fix mypy errors

This commit is contained in:
pifou 2020-10-26 23:19:52 +01:00
parent 709e1de9c9
commit 4fda55aba0

View File

@ -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)