mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Azure flake8 dep, docstring fixes (#25605)
* Fix Azure CI flake8 deps * Docstyle fixes
This commit is contained in:
parent
3cf8964c06
commit
0490167a12
@ -38,7 +38,7 @@ stages:
|
||||
python -m venv venv
|
||||
|
||||
. venv/bin/activate
|
||||
pip install flake8
|
||||
pip install -r requirements_test.txt
|
||||
displayName: 'Setup Env'
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
|
@ -174,7 +174,7 @@ class PublicTransportData():
|
||||
self.info = []
|
||||
|
||||
def intersection(lst1, lst2):
|
||||
"""Return items contained in both lists"""
|
||||
"""Return items contained in both lists."""
|
||||
return list(set(lst1) & set(lst2))
|
||||
|
||||
# Limit search to selected types, to get more results
|
||||
|
@ -147,7 +147,7 @@ class RingCam(Camera):
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""Updates controlled via the hub."""
|
||||
"""Return False, updates are controlled via the hub."""
|
||||
return False
|
||||
|
||||
def update(self):
|
||||
|
@ -109,7 +109,7 @@ class RingSensor(Entity):
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""Updates controlled via the hub."""
|
||||
"""Return False, updates are controlled via the hub."""
|
||||
return False
|
||||
|
||||
@property
|
||||
|
@ -204,6 +204,7 @@ class ZigbeeChannel(LogMixin):
|
||||
return result.get(attribute)
|
||||
|
||||
def log(self, level, msg, *args):
|
||||
"""Log a message."""
|
||||
msg = '[%s]: ' + msg
|
||||
args = (self.unique_id, ) + args
|
||||
_LOGGER.log(level, msg, *args)
|
||||
@ -301,6 +302,7 @@ class ZDOChannel(LogMixin):
|
||||
self._status = ChannelStatus.CONFIGURED
|
||||
|
||||
def log(self, level, msg, *args):
|
||||
"""Log a message."""
|
||||
msg = '[%s:ZDO](%s): ' + msg
|
||||
args = (self._zha_device.nwk, self._zha_device.model, ) + args
|
||||
_LOGGER.log(level, msg, *args)
|
||||
|
@ -444,6 +444,7 @@ class ZHADevice(LogMixin):
|
||||
return response
|
||||
|
||||
def log(self, level, msg, *args):
|
||||
"""Log a message."""
|
||||
msg = '[%s](%s): ' + msg
|
||||
args = (self.nwk, self.model, ) + args
|
||||
_LOGGER.log(level, msg, *args)
|
||||
|
@ -189,6 +189,7 @@ class ZhaEntity(RestoreEntity, LogMixin, entity.Entity):
|
||||
self._unsubs.append(unsub)
|
||||
|
||||
def log(self, level, msg, *args):
|
||||
"""Log a message."""
|
||||
msg = '%s: ' + msg
|
||||
args = (self.entity_id, ) + args
|
||||
_LOGGER.log(level, msg, *args)
|
||||
|
@ -225,6 +225,7 @@ def test_discover_lights(hue_client):
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_light_without_brightness_supported(hass_hue, hue_client):
|
||||
"""Test that light without brightness is supported."""
|
||||
light_without_brightness_json = yield from perform_get_light_state(
|
||||
hue_client, 'light.no_brightness', 200)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user