pylint 2.3.0 (#21485)

* pylint 2.3.0

* remove const

*  disable=syntax-error
This commit is contained in:
Daniel Høyer Iversen 2019-02-27 22:10:40 +01:00 committed by David F. Mulcahey
parent 2482816a11
commit 519315f9c8
26 changed files with 47 additions and 57 deletions

View file

@ -125,13 +125,13 @@ def execute(hass, filename, source, data=None):
# pylint: disable=too-many-boolean-expressions
if name.startswith('async_'):
raise ScriptError("Not allowed to access async methods")
elif (obj is hass and name not in ALLOWED_HASS or
obj is hass.bus and name not in ALLOWED_EVENTBUS or
obj is hass.states and name not in ALLOWED_STATEMACHINE or
obj is hass.services and name not in ALLOWED_SERVICEREGISTRY or
obj is dt_util and name not in ALLOWED_DT_UTIL or
obj is datetime and name not in ALLOWED_DATETIME or
isinstance(obj, TimeWrapper) and name not in ALLOWED_TIME):
if (obj is hass and name not in ALLOWED_HASS or
obj is hass.bus and name not in ALLOWED_EVENTBUS or
obj is hass.states and name not in ALLOWED_STATEMACHINE or
obj is hass.services and name not in ALLOWED_SERVICEREGISTRY or
obj is dt_util and name not in ALLOWED_DT_UTIL or
obj is datetime and name not in ALLOWED_DATETIME or
isinstance(obj, TimeWrapper) and name not in ALLOWED_TIME):
raise ScriptError("Not allowed to access {}.{}".format(
obj.__class__.__name__, name))