mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Fix style issues
This commit is contained in:
parent
33daf0a385
commit
09bf64db42
@ -51,7 +51,9 @@ def setup(hass, config):
|
|||||||
def _handle_get_root(handler, path_match, data):
|
def _handle_get_root(handler, path_match, data):
|
||||||
""" Renders the debug interface. """
|
""" Renders the debug interface. """
|
||||||
|
|
||||||
write = lambda txt: handler.wfile.write((txt + "\n").encode("UTF-8"))
|
def write(txt):
|
||||||
|
""" Helper to write text to the output. """
|
||||||
|
handler.wfile.write((txt + "\n").encode("UTF-8"))
|
||||||
|
|
||||||
handler.send_response(HTTP_OK)
|
handler.send_response(HTTP_OK)
|
||||||
handler.send_header('Content-type', 'text/html; charset=utf-8')
|
handler.send_header('Content-type', 'text/html; charset=utf-8')
|
||||||
|
@ -78,6 +78,8 @@ def row_to_event(row):
|
|||||||
|
|
||||||
|
|
||||||
def run_information(point_in_time=None):
|
def run_information(point_in_time=None):
|
||||||
|
""" Returns information about current run or the run that
|
||||||
|
covers point_in_time. """
|
||||||
_verify_instance()
|
_verify_instance()
|
||||||
|
|
||||||
if point_in_time is None:
|
if point_in_time is None:
|
||||||
@ -131,6 +133,8 @@ class RecorderRun(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def where_after_start_run(self):
|
def where_after_start_run(self):
|
||||||
|
""" Returns SQL WHERE clause to select rows
|
||||||
|
created after the start of the run. """
|
||||||
return "created >= {} ".format(_adapt_datetime(self.start))
|
return "created >= {} ".format(_adapt_datetime(self.start))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user