changed yaml loaders

This commit is contained in:
ari committed 2022-05-20 10:53:53 -04:00
1 parent cbbc099384
commit 298a233a5f
6 files changed
+83 -30

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import yaml
from src.yaml_serializer.types import (
IncludedYaml,
IncludedYamlDir,
SecretValue,
)
class YamlSafeDumper(yaml.SafeDumper):
pass
YamlSafeDumper.add_representer(IncludedYaml, IncludedYaml.to_yaml)
YamlSafeDumper.add_representer(SecretValue, SecretValue.to_yaml)
YamlSafeDumper.add_representer(IncludedYamlDir, IncludedYamlDir.to_yaml)