Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)