Fix pylint 1.7.2 no-else-return issues (#8361)
* Fix pylint 1.7.2 no-else-return issues * Update tomato.py
This commit is contained in:
1 parent
5779d64e98
commit
46e030662d
111 files changed
+305
-455
No files matched your search
@@ -89,10 +89,7 @@ class NeatoConnectedSwitch(ToggleEntity):
|
||||
@property
|
||||
def available(self):
|
||||
"""Return True if entity is available."""
|
||||
if not self._state:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
||||
@@ -137,9 +137,9 @@ class RachioIro(object):
|
||||
|
||||
if include_disabled:
|
||||
return self._zones
|
||||
else:
|
||||
self.update(no_throttle=True)
|
||||
return [z for z in self._zones if z.is_enabled]
|
||||
|
||||
self.update(no_throttle=True)
|
||||
return [z for z in self._zones if z.is_enabled]
|
||||
|
||||
@util.Throttle(MIN_UPDATE_INTERVAL, MIN_FORCED_UPDATE_INTERVAL)
|
||||
def update(self, **kwargs):
|
||||
|
||||
@@ -162,8 +162,7 @@ class WemoSwitch(SwitchDevice):
|
||||
return STATE_OFF
|
||||
elif standby_state == WEMO_STANDBY:
|
||||
return STATE_STANDBY
|
||||
else:
|
||||
return STATE_UNKNOWN
|
||||
return STATE_UNKNOWN
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
@@ -186,8 +185,7 @@ class WemoSwitch(SwitchDevice):
|
||||
"""Return the icon of device based on its type."""
|
||||
if self._model_name == 'CoffeeMaker':
|
||||
return 'mdi:coffee'
|
||||
else:
|
||||
return super().icon
|
||||
return None
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the switch on."""
|
||||
|
||||
Reference in new issue
Block a user