1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

fix multi-line comment warning/error (#2891)

This commit is contained in:
Martin
2021-12-13 19:15:22 +01:00
committed by GitHub
parent b3fb35783e
commit 16e7bd0388

View File

@@ -145,6 +145,8 @@ def wrap_to_code(name, comp):
if comp.config_schema is not None: if comp.config_schema is not None:
conf_str = yaml_util.dump(conf) conf_str = yaml_util.dump(conf)
conf_str = conf_str.replace("//", "") conf_str = conf_str.replace("//", "")
# remove tailing \ to avoid multi-line comment warning
conf_str = conf_str.replace("\\\n", "\n")
cg.add(cg.LineComment(indent(conf_str))) cg.add(cg.LineComment(indent(conf_str)))
await coro(conf) await coro(conf)