Add dump_yaml method to ConfigLoader
MODIFY
plextraktsync/config.py
plextraktsync/config.py
@@ -100,6 +100,12 @@ def write_yaml(path: str, config):
with open(path, "w", encoding="utf-8") as fp:
yaml.dump(config, fp, allow_unicode=True, indent=2)
+ @staticmethod
+ def dump_yaml(fp, config):
+ import yaml
+
+ return yaml.dump(config, fp, allow_unicode=True, indent=2)
+
class Config(dict):
env_keys = [

Add dump_yaml method to ConfigLoader