Docstring updates (#2404)
* Fix docstring * Fix typo * Update docstrings * Update docstrings
This commit is contained in:
parent
fe0164b137
commit
3870d2e0cd
5 changed files with 12 additions and 12 deletions
|
@ -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):
|
||||
|
|
|
@ -149,7 +149,7 @@ def setup(hass, base_config):
|
|||
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:
|
||||
|
@ -175,7 +175,7 @@ def setup(hass, base_config):
|
|||
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,
|
||||
|
@ -191,7 +191,7 @@ def setup(hass, base_config):
|
|||
|
||||
|
||||
class EnvisalinkDevice(Entity):
|
||||
"""Representation of an envisalink devicetity."""
|
||||
"""Representation of an Envisalink device."""
|
||||
|
||||
def __init__(self, name, info, controller):
|
||||
"""Initialize the device."""
|
||||
|
|
|
@ -33,7 +33,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
|
||||
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),
|
||||
|
|
|
@ -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."""
|
||||
|
|
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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 = {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue