17 lines
416 B
Python
17 lines
416 B
Python
import yaml
|
|
|
|
from src.yaml_serializer.types import (
|
|
IncludedYaml,
|
|
IncludedYamlDir,
|
|
SecretValue,
|
|
)
|
|
|
|
|
|
class YamlSafeDumper(yaml.SafeDumper):
|
|
pass
|
|
|
|
|
|
YamlSafeDumper.add_representer(IncludedYaml, IncludedYaml.to_yaml) # type: ignore
|
|
YamlSafeDumper.add_representer(SecretValue, SecretValue.to_yaml) # type: ignore
|
|
YamlSafeDumper.add_representer(IncludedYamlDir, IncludedYamlDir.to_yaml) # type: ignore
|