Update docstrings (#7361)

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2017-04-29 22:04:49 -07:00
1 parent e22e70a01a
commit 3ee4d1060f
264 files changed
+1686 -1768

No files matched your search

@@ -20,7 +20,6 @@ from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.loader import get_component
DOMAIN = 'image_processing'
DEPENDENCIES = ['camera']
@@ -67,7 +66,7 @@ def scan(hass, entity_id=None):
@asyncio.coroutine
def async_setup(hass, config):
"""Setup image processing."""
"""Set up image processing."""
component = EntityComponent(_LOGGER, DOMAIN, hass, SCAN_INTERVAL)
yield from component.async_setup(config)
@@ -12,7 +12,7 @@ from homeassistant.components.image_processing.microsoft_face_identify import (
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the demo image_processing platform."""
"""Set up the demo image_processing platform."""
add_devices([
DemoImageProcessingAlpr('camera.demo_camera', "Demo Alpr"),
DemoImageProcessingFace(
@@ -50,7 +50,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the microsoft face detection platform."""
"""Set up the Microsoft Face detection platform."""
api = hass.data[DATA_MICROSOFT_FACE]
attributes = config[CONF_ATTRIBUTES]
@@ -64,10 +64,10 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
class MicrosoftFaceDetectEntity(ImageProcessingFaceEntity):
"""Microsoft face api entity for identify."""
"""Microsoft Face API entity for identify."""
def __init__(self, camera_entity, api, attributes, name=None):
"""Initialize openalpr local api."""
"""Initialize Microsoft Face."""
super().__init__()
self._api = api
@@ -42,7 +42,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the Microsoft face identify platform."""
"""Set up the Microsoft Face identify platform."""
api = hass.data[DATA_MICROSOFT_FACE]
face_group = config[CONF_GROUP]
confidence = config[CONF_CONFIDENCE]
@@ -145,10 +145,10 @@ class ImageProcessingFaceEntity(ImageProcessingEntity):
class MicrosoftFaceIdentifyEntity(ImageProcessingFaceEntity):
"""Microsoft face api entity for identify."""
"""Representation of the Microsoft Face API entity for identify."""
def __init__(self, camera_entity, api, face_group, confidence, name=None):
"""Initialize openalpr local api."""
"""Initialize the Microsoft Face API."""
super().__init__()
self._api = api
@@ -1,5 +1,5 @@
"""
Component that will help set the openalpr cloud for alpr processing.
Component that will help set the OpenALPR cloud for ALPR processing.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/image_processing.openalpr_cloud/
@@ -51,7 +51,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the openalpr cloud api platform."""
"""Set up the OpenALPR cloud API platform."""
confidence = config[CONF_CONFIDENCE]
params = {
'secret_key': config[CONF_API_KEY],
@@ -70,10 +70,10 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
class OpenAlprCloudEntity(ImageProcessingAlprEntity):
"""OpenAlpr cloud entity."""
"""OpenALPR cloud entity."""
def __init__(self, camera_entity, params, confidence, name=None):
"""Initialize openalpr local api."""
"""Initialize OpenALPR cloud API."""
super().__init__()
self._params = params
@@ -126,7 +126,7 @@ class OpenAlprCloudEntity(ImageProcessingAlprEntity):
return
except (asyncio.TimeoutError, aiohttp.ClientError):
_LOGGER.error("Timeout for openalpr api.")
_LOGGER.error("Timeout for OpenALPR API")
return
# processing api data
@@ -1,5 +1,5 @@
"""
Component that will help set the openalpr local for alpr processing.
Component that will help set the OpenALPR local for ALPR processing.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/image_processing.openalpr_local/
@@ -60,7 +60,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the openalpr local platform."""
"""Set up the OpenALPR local platform."""
command = [config[CONF_ALPR_BIN], '-c', config[CONF_REGION], '-']
confidence = config[CONF_CONFIDENCE]
@@ -74,7 +74,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
class ImageProcessingAlprEntity(ImageProcessingEntity):
"""Base entity class for alpr image processing."""
"""Base entity class for ALPR image processing."""
def __init__(self):
"""Initialize base alpr entity."""
@@ -144,10 +144,10 @@ class ImageProcessingAlprEntity(ImageProcessingEntity):
class OpenAlprLocalEntity(ImageProcessingAlprEntity):
"""OpenAlpr local api entity."""
"""OpenALPR local api entity."""
def __init__(self, camera_entity, command, confidence, name=None):
"""Initialize openalpr local api."""
"""Initialize OpenALPR local API."""
super().__init__()
self._cmd = command