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