1
0
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:
pifou 2020-10-27 23:09:44 +01:00
parent 763b6e5005
commit 4afd5685cb
2 changed files with 7 additions and 7 deletions

View File

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