mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-18 08:10:17 -07:00
fix tox warnings and errors
This commit is contained in:
parent
763b6e5005
commit
4afd5685cb
@ -148,15 +148,15 @@ class Client(object):
|
||||
from . import util
|
||||
|
||||
deviceInfo = self.get_device(device_id)
|
||||
if deviceInfo == None:
|
||||
if not deviceInfo:
|
||||
return None
|
||||
classes = util.device_classes()
|
||||
if deviceInfo.type in classes:
|
||||
return classes.get(deviceInfo.type)(self, deviceInfo)
|
||||
LOGGER.debug('No specific subclass for deviceType %s, using default', deviceInfo.type)
|
||||
LOGGER.debug('No specific subclass for deviceType %s, using default',
|
||||
deviceInfo.type)
|
||||
return Device(self, deviceInfo)
|
||||
|
||||
|
||||
@classmethod
|
||||
def load(cls, state: Dict[str, Any]) -> 'Client':
|
||||
"""Load a client from serialized state.
|
||||
|
Loading…
x
Reference in New Issue
Block a user