Update docstring (config file) and attempt to honor PEP0257

This commit is contained in:
Fabian Affolter committed 2015-09-07 19:19:11 +02:00
1 parent 1ed8e58679
commit 514b8eddb9
10 files changed
+109 -81

No files matched your search

@@ -9,7 +9,7 @@ This device tracker needs telnet to be enabled on the router.
Configuration:
To use the THOMSON tracker you will need to add something like the following
to your config/configuration.yaml
to your configuration.yaml file.
device_tracker:
platform: thomson
@@ -71,7 +71,8 @@ def get_scanner(hass, config):
class ThomsonDeviceScanner(object):
""" This class queries a router running THOMSON firmware
"""
This class queries a router running THOMSON firmware
for connected devices. Adapted from ASUSWRT scanner.
"""
@@ -107,8 +108,10 @@ class ThomsonDeviceScanner(object):
@Throttle(MIN_TIME_BETWEEN_SCANS)
def _update_info(self):
""" Ensures the information from the THOMSON router is up to date.
Returns boolean if scanning successful. """
"""
Ensures the information from the THOMSON router is up to date.
Returns boolean if scanning successful.
"""
if not self.success_init:
return False
@@ -125,7 +128,7 @@ class ThomsonDeviceScanner(object):
return True
def get_thomson_data(self):
""" Retrieve data from THOMSON and return parsed result. """
""" Retrieve data from THOMSON and return parsed result. """
try:
telnet = telnetlib.Telnet(self.host)
telnet.read_until(b'Username : ')