mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-16 15:20:09 -07:00
fix mypy errors
This commit is contained in:
parent
709e1de9c9
commit
4fda55aba0
@ -265,7 +265,7 @@ class DeviceInfo(object):
|
|||||||
DeviceType.DRYER : DryerDevice,
|
DeviceType.DRYER : DryerDevice,
|
||||||
DeviceType.WASHER : WasherDevice,
|
DeviceType.WASHER : WasherDevice,
|
||||||
"""
|
"""
|
||||||
mapping = dict()
|
mapping : dict[DeviceType, Device] = {}
|
||||||
|
|
||||||
def __init__(self, data: Dict[str, Any]) -> None:
|
def __init__(self, data: Dict[str, Any]) -> None:
|
||||||
self.data = data
|
self.data = data
|
||||||
@ -296,9 +296,9 @@ class DeviceInfo(object):
|
|||||||
"""Load JSON data describing the model's capabilities.
|
"""Load JSON data describing the model's capabilities.
|
||||||
"""
|
"""
|
||||||
return requests.get(self.model_info_url).json()
|
return requests.get(self.model_info_url).json()
|
||||||
|
|
||||||
def load_object(self):
|
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:
|
if self.type in DeviceInfo.mapping:
|
||||||
return DeviceInfo.mapping.get(self.type)
|
return DeviceInfo.mapping.get(self.type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user