Small collection of random styling tweaks, fixes and Pythonism (#35390)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-05-09 00:10:17 +02:00
1 parent 3feb55a8e4
commit 4cf186a47e
14 files changed
+28 -57

No files matched your search

@@ -55,11 +55,8 @@ GOOGLE_SERVICE_ACCOUNT = vol.Schema(
def _check_report_state(data):
if data[CONF_REPORT_STATE]:
if CONF_SERVICE_ACCOUNT not in data:
raise vol.Invalid(
"If report state is enabled, a service account must exist"
)
if data[CONF_REPORT_STATE] and CONF_SERVICE_ACCOUNT not in data:
raise vol.Invalid("If report state is enabled, a service account must exist")
return data