Update docstrings to match PEP257

This commit is contained in:
Fabian Affolter committed 2016-03-07 18:50:30 +01:00
1 parent 7ff9aecd4e
commit b8a40457ee
40 files changed
+371 -483

No files matched your search

+10 -13
View File
@@ -1,7 +1,5 @@
"""
homeassistant.components.scsgate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides support for SCSGate components.
Support for SCSGate components.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/scsgate/
@@ -18,8 +16,7 @@ _LOGGER = logging.getLogger(__name__)
class SCSGate:
""" Class dealing with the SCSGate device via scsgate.Reactor. """
"""Class dealing with the SCSGate device via scsgate.Reactor."""
def __init__(self, device, logger):
self._logger = logger
self._devices = {}
@@ -38,7 +35,7 @@ class SCSGate:
handle_message=self.handle_message)
def handle_message(self, message):
""" Method called whenever a message is seen on the bus. """
"""Method called whenever a message is seen on the bus."""
from scsgate.messages import StateMessage, ScenarioTriggeredMessage
self._logger.debug("Received message {}".format(message))
@@ -88,14 +85,14 @@ class SCSGate:
self._devices[device.scs_id] = device
def add_devices_to_register(self, devices):
""" List of devices to be registered. """
"""List of devices to be registered."""
with self._devices_to_register_lock:
for device in devices:
self._devices_to_register[device.scs_id] = device
self._activate_next_device()
def _activate_next_device(self):
""" Starts the activation of the first device. """
"""Starts the activation of the first device."""
from scsgate.tasks import GetStatusTask
with self._devices_to_register_lock:
@@ -107,7 +104,7 @@ class SCSGate:
self._reactor.append_task(GetStatusTask(target=device.scs_id))
def is_device_registered(self, device_id):
""" Checks whether a device is already registered or not. """
"""Checks whether a device is already registered or not."""
with self._devices_to_register_lock:
if device_id in self._devices_to_register.keys():
return False
@@ -119,20 +116,20 @@ class SCSGate:
return True
def start(self):
""" Start the scsgate.Reactor. """
"""Start the scsgate.Reactor."""
self._reactor.start()
def stop(self):
""" Stop the scsgate.Reactor. """
"""Stop the scsgate.Reactor."""
self._reactor.stop()
def append_task(self, task):
""" Registers a new task to be executed. """
"""Registers a new task to be executed."""
self._reactor.append_task(task)
def setup(hass, config):
""" Setup the SCSGate component. """
"""Setup the SCSGate component."""
device = config['scsgate']['device']
global SCSGATE