Modify docstrings to match PEP257

This commit is contained in:
Fabian Affolter
2016-03-07 17:14:55 +01:00
parent 5222c19b4c
commit 6ac9210919
9 changed files with 48 additions and 68 deletions

View File

@@ -1,6 +1,4 @@
"""
homeassistant.components.automation.sun
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offers sun based automation rules.
For more details about this automation rule, please refer to the documentation
@@ -29,7 +27,7 @@ _LOGGER = logging.getLogger(__name__)
def trigger(hass, config, action):
""" Listen for events based on config. """
"""Listen for events based on configuration."""
event = config.get(CONF_EVENT)
if event is None:
@@ -55,7 +53,7 @@ def trigger(hass, config, action):
def if_action(hass, config):
""" Wraps action method with sun based condition. """
"""Wraps action method with sun based condition."""
before = config.get(CONF_BEFORE)
after = config.get(CONF_AFTER)
@@ -106,8 +104,7 @@ def if_action(hass, config):
return sun.next_setting(hass) + after_offset
def time_if():
""" Validate time based if-condition """
"""Validate time based if-condition."""
now = dt_util.now()
before = before_func()
after = after_func()
@@ -126,6 +123,7 @@ def if_action(hass, config):
def _parse_offset(raw_offset):
"""Parse the offset."""
if raw_offset is None:
return timedelta(0)