Fixes for PEP257 (#11810)

* Fixes for PEP257

* More updates
This commit is contained in:
Fabian Affolter 2018-01-21 07:35:38 +01:00 committed by Paulus Schoutsen
parent 0100f87ff2
commit 47e31dc9ee
143 changed files with 1584 additions and 1761 deletions

View file

@ -12,11 +12,11 @@ import time
import voluptuous as vol
import homeassistant.util.dt as dt_util
from homeassistant.const import SERVICE_RELOAD
from homeassistant.exceptions import HomeAssistantError
from homeassistant.loader import bind_hass
from homeassistant.util import sanitize_filename
import homeassistant.util.dt as dt_util
REQUIREMENTS = ['restrictedpython==4.0b2']
@ -185,7 +185,7 @@ class StubPrinter:
class TimeWrapper:
"""Wrapper of the time module."""
"""Wrap the time module."""
# Class variable, only going to warn once per Home Assistant run
warned = False
@ -205,7 +205,7 @@ class TimeWrapper:
attribute = getattr(time, attr)
if callable(attribute):
def wrapper(*args, **kw):
"""Wrapper to return callable method if callable."""
"""Wrap to return callable method if callable."""
return attribute(*args, **kw)
return wrapper
else: