Skip to content

Commit

Permalink
Docstring updates (home-assistant#2404)
Browse files Browse the repository at this point in the history
* Fix docstring

* Fix typo

* Update docstrings

* Update docstrings
  • Loading branch information
fabaff authored Jul 1, 2016
1 parent fe0164b commit 3870d2e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/binary_sensor/envisalink.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):


class EnvisalinkBinarySensor(EnvisalinkDevice, BinarySensorDevice):
"""Representation of an envisalink Binary Sensor."""
"""Representation of an Envisalink binary sensor."""

# pylint: disable=too-many-arguments
def __init__(self, zone_number, zone_name, zone_type, info, controller):
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/envisalink.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def stop_envisalink(event):
EVL_CONTROLLER.stop()

def start_envisalink(event):
"""Startup process for the envisalink."""
"""Startup process for the Envisalink."""
EVL_CONTROLLER.start()
for _ in range(10):
if 'success' in _connect_status:
Expand All @@ -175,7 +175,7 @@ def start_envisalink(event):
if not _result:
return False

# Load sub-components for envisalink
# Load sub-components for Envisalink
if _partitions:
load_platform(hass, 'alarm_control_panel', 'envisalink',
{'partitions': _partitions,
Expand All @@ -191,7 +191,7 @@ def start_envisalink(event):


class EnvisalinkDevice(Entity):
"""Representation of an envisalink devicetity."""
"""Representation of an Envisalink device."""

def __init__(self, name, info, controller):
"""Initialize the device."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/persistent_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


def create(hass, message, title=None, notification_id=None):
"""Turn all or specified light off."""
"""Generate a notification."""
data = {
key: value for key, value in [
(ATTR_TITLE, title),
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/envisalink.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):


class EnvisalinkSensor(EnvisalinkDevice):
"""Representation of an envisalink keypad."""
"""Representation of an Envisalink keypad."""

def __init__(self, partition_name, partition_number, info, controller):
"""Initialize the sensor."""
Expand Down
12 changes: 6 additions & 6 deletions homeassistant/util/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _include_yaml(loader, node):


def _include_dir_named_yaml(loader, node):
"""Load multiple files from dir as a dict."""
"""Load multiple files from directory as a dictionary."""
mapping = OrderedDict()
files = os.path.join(os.path.dirname(loader.name), node.value, '*.yaml')
for fname in glob.glob(files):
Expand All @@ -61,7 +61,7 @@ def _include_dir_named_yaml(loader, node):


def _include_dir_merge_named_yaml(loader, node):
"""Load multiple files from dir as a merged dict."""
"""Load multiple files from directory as a merged dictionary."""
mapping = OrderedDict()
files = os.path.join(os.path.dirname(loader.name), node.value, '*.yaml')
for fname in glob.glob(files):
Expand All @@ -72,13 +72,13 @@ def _include_dir_merge_named_yaml(loader, node):


def _include_dir_list_yaml(loader, node):
"""Load multiple files from dir as a list."""
"""Load multiple files from directory as a list."""
files = os.path.join(os.path.dirname(loader.name), node.value, '*.yaml')
return [load_yaml(f) for f in glob.glob(files)]


def _include_dir_merge_list_yaml(loader, node):
"""Load multiple files from dir as a merged list."""
"""Load multiple files from directory as a merged list."""
files = os.path.join(os.path.dirname(loader.name), node.value, '*.yaml')
merged_list = []
for fname in glob.glob(files):
Expand All @@ -89,7 +89,7 @@ def _include_dir_merge_list_yaml(loader, node):


def _ordered_dict(loader, node):
"""Load YAML mappings into an ordered dict to preserve key order."""
"""Load YAML mappings into an ordered dictionary to preserve key order."""
loader.flatten_mapping(node)
nodes = loader.construct_pairs(node)

Expand Down Expand Up @@ -127,7 +127,7 @@ def _env_var_yaml(loader, node):
# pylint: disable=protected-access
def _secret_yaml(loader, node):
"""Load secrets and embed it into the configuration YAML."""
# Create secret cache on loader and load secret.yaml
# Create secret cache on loader and load secrets.yaml
if not hasattr(loader, '_SECRET_CACHE'):
loader._SECRET_CACHE = {}

Expand Down

0 comments on commit 3870d2e

Please sign in to comment.