async def wrapped(conf): cg.add(cg.LineComment(f"{name}:")) if comp.config_schema is not None: conf_str = yaml_util.dump(conf) conf_str = conf_str.replace("//", "") cg.add(cg.LineComment(indent(conf_str))) await coro(conf)
def wrapped(conf): cg.add(cg.LineComment(f"{name}:")) if comp.config_schema is not None: conf_str = yaml_util.dump(conf) conf_str = conf_str.replace('//', '') cg.add(cg.LineComment(indent(conf_str))) yield coro(conf)
def wrapped(conf): cg.add(cg.LineComment(u"{}:".format(name))) if comp.config_schema is not None: conf_str = yaml_util.dump(conf) if IS_PY2: conf_str = conf_str.decode('utf-8') cg.add(cg.LineComment(indent(conf_str))) yield coro(conf)
async def wrapped(conf): cg.add(cg.LineComment(f"{name}:")) if comp.config_schema is not None: conf_str = yaml_util.dump(conf) 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))) await coro(conf)