mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Misc cleanups (#15907)
* device_tracker.huawei_router: Pylint logging-not-lazy fix * sensor.irish_rail_transport: Clean up redundant self.info test
This commit is contained in:
parent
f98629b895
commit
1911168855
@ -85,8 +85,7 @@ class HuaweiDeviceScanner(DeviceScanner):
|
|||||||
active_clients = [client for client in data if client.state]
|
active_clients = [client for client in data if client.state]
|
||||||
self.last_results = active_clients
|
self.last_results = active_clients
|
||||||
|
|
||||||
# pylint: disable=logging-not-lazy
|
_LOGGER.debug("Active clients: %s", "\n"
|
||||||
_LOGGER.debug("Active clients: " + "\n"
|
|
||||||
.join((client.mac + " " + client.name)
|
.join((client.mac + " " + client.name)
|
||||||
for client in active_clients))
|
for client in active_clients))
|
||||||
return True
|
return True
|
||||||
|
@ -164,7 +164,7 @@ class IrishRailTransportData:
|
|||||||
ATTR_TRAIN_TYPE: train.get('type')}
|
ATTR_TRAIN_TYPE: train.get('type')}
|
||||||
self.info.append(train_data)
|
self.info.append(train_data)
|
||||||
|
|
||||||
if not self.info or not self.info:
|
if not self.info:
|
||||||
self.info = self._empty_train_data()
|
self.info = self._empty_train_data()
|
||||||
|
|
||||||
def _empty_train_data(self):
|
def _empty_train_data(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user