1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 16:52:18 +01:00

Raise minimum python version to 3.8 (#3176)

This commit is contained in:
Jesse Hills
2022-02-10 21:55:11 +13:00
committed by GitHub
parent ad6c5ff11d
commit 40e06c9819
18 changed files with 253 additions and 180 deletions

View File

@@ -77,11 +77,11 @@ async def to_code(config):
if CONF_CSS_INCLUDE in config:
cg.add_define("WEBSERVER_CSS_INCLUDE")
path = CORE.relative_config_path(config[CONF_CSS_INCLUDE])
with open(file=path, mode="r", encoding="utf-8") as myfile:
with open(file=path, encoding="utf-8") as myfile:
cg.add(var.set_css_include(myfile.read()))
if CONF_JS_INCLUDE in config:
cg.add_define("WEBSERVER_JS_INCLUDE")
path = CORE.relative_config_path(config[CONF_JS_INCLUDE])
with open(file=path, mode="r", encoding="utf-8") as myfile:
with open(file=path, encoding="utf-8") as myfile:
cg.add(var.set_js_include(myfile.read()))
cg.add(var.set_include_internal(config[CONF_INCLUDE_INTERNAL]))