diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-12-21 22:31:42 -0600 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2023-11-05 15:31:22 -0500 |
| commit | 3f874d1ba218a82ac354af748be73bbbf6e0d985 (patch) | |
| tree | 132cf9a69e7e4f725ad9366424791e24b0ea7a84 /config_file/parsers/yaml_parser.py | |
| parent | Fix readme badge (diff) | |
| download | config-file-3f874d1ba218a82ac354af748be73bbbf6e0d985.zip | |
Remove depreciated stringify() method
Diffstat (limited to 'config_file/parsers/yaml_parser.py')
| -rw-r--r-- | config_file/parsers/yaml_parser.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config_file/parsers/yaml_parser.py b/config_file/parsers/yaml_parser.py index 4c39582..39dd2d6 100644 --- a/config_file/parsers/yaml_parser.py +++ b/config_file/parsers/yaml_parser.py @@ -18,14 +18,17 @@ class YamlParser(BaseParser): @property def decode_error(self) -> Type[Exception]: from ruamel.yaml import YAMLError + return YAMLError def loads(self, contents: str) -> dict: from ruamel.yaml import YAML + return YAML().load(contents) def dumps(self, loaded_contents: dict) -> str: from ruamel.yaml import YAML + buffer = StringIO() YAML().dump(loaded_contents, buffer) return buffer.getvalue() |