[web_server] Minor python formatting (#6735)

This commit is contained in:
Jesse Hills 2024-05-14 15:38:53 +12:00 committed by GitHub
parent 921e56f2c6
commit 036a666e36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,19 +35,19 @@ WebServer = web_server_ns.class_("WebServer", cg.Component, cg.Controller)
def default_url(config): def default_url(config):
config = config.copy() config = config.copy()
if config[CONF_VERSION] == 1: if config[CONF_VERSION] == 1:
if not (CONF_CSS_URL in config): if CONF_CSS_URL not in config:
config[CONF_CSS_URL] = "https://esphome.io/_static/webserver-v1.min.css" config[CONF_CSS_URL] = "https://esphome.io/_static/webserver-v1.min.css"
if not (CONF_JS_URL in config): if CONF_JS_URL not in config:
config[CONF_JS_URL] = "https://esphome.io/_static/webserver-v1.min.js" config[CONF_JS_URL] = "https://esphome.io/_static/webserver-v1.min.js"
if config[CONF_VERSION] == 2: if config[CONF_VERSION] == 2:
if not (CONF_CSS_URL in config): if CONF_CSS_URL not in config:
config[CONF_CSS_URL] = "" config[CONF_CSS_URL] = ""
if not (CONF_JS_URL in config): if CONF_JS_URL not in config:
config[CONF_JS_URL] = "https://oi.esphome.io/v2/www.js" config[CONF_JS_URL] = "https://oi.esphome.io/v2/www.js"
if config[CONF_VERSION] == 3: if config[CONF_VERSION] == 3:
if not (CONF_CSS_URL in config): if CONF_CSS_URL not in config:
config[CONF_CSS_URL] = "" config[CONF_CSS_URL] = ""
if not (CONF_JS_URL in config): if CONF_JS_URL not in config:
config[CONF_JS_URL] = "https://oi.esphome.io/v3/www.js" config[CONF_JS_URL] = "https://oi.esphome.io/v3/www.js"
return config return config