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

+4 -4
View File
@@ -20,14 +20,14 @@ ON_DEMAND = ('zwave', )
@asyncio.coroutine
def async_setup(hass, config):
"""Setup the config component."""
"""Set up the config component."""
register_built_in_panel(hass, 'config', 'Configuration', 'mdi:settings')
@asyncio.coroutine
def setup_panel(panel_name):
"""Setup a panel."""
panel = yield from async_prepare_setup_platform(hass, config, DOMAIN,
panel_name)
"""Set up a panel."""
panel = yield from async_prepare_setup_platform(
hass, config, DOMAIN, panel_name)
if not panel:
return
+2 -2
View File
@@ -7,7 +7,7 @@ from homeassistant.config import async_check_ha_config_file
@asyncio.coroutine
def async_setup(hass):
"""Setup the hassbian config."""
"""Set up the Hassbian config."""
hass.http.register_view(CheckConfigView)
return True
@@ -20,7 +20,7 @@ class CheckConfigView(HomeAssistantView):
@asyncio.coroutine
def post(self, request):
"""Validate config and return results."""
"""Validate configuration and return results."""
errors = yield from async_check_ha_config_file(request.app['hass'])
state = 'invalid' if errors else 'valid'
+2 -3
View File
@@ -11,9 +11,8 @@ CONFIG_PATH = 'groups.yaml'
@asyncio.coroutine
def async_setup(hass):
"""Setup the Group config API."""
"""Set up the Group config API."""
hass.http.register_view(EditKeyBasedConfigView(
'group', 'config', CONFIG_PATH, cv.slug,
GROUP_SCHEMA
'group', 'config', CONFIG_PATH, cv.slug, GROUP_SCHEMA
))
return True
+3 -3
View File
@@ -32,8 +32,8 @@ _TEST_OUTPUT = """
@asyncio.coroutine
def async_setup(hass):
"""Setup the hassbian config."""
# Test if is hassbian
"""Set up the Hassbian config."""
# Test if is Hassbian
test_mode = 'FORCE_HASSBIAN' in os.environ
is_hassbian = test_mode
@@ -49,7 +49,7 @@ def async_setup(hass):
@asyncio.coroutine
def hassbian_status(hass, test_mode=False):
"""Query for the Hassbian status."""
# fetch real output when not in test mode
# Fetch real output when not in test mode
if test_mode:
return json.loads(_TEST_OUTPUT)
+1 -1
View File
@@ -11,7 +11,7 @@ CONFIG_PATH = 'zwave_device_config.yaml'
@asyncio.coroutine
def async_setup(hass):
"""Setup the Z-Wave config API."""
"""Set up the Z-Wave config API."""
hass.http.register_view(EditKeyBasedConfigView(
'zwave', 'device_config', CONFIG_PATH, cv.entity_id,
DEVICE_CONFIG_SCHEMA_ENTRY