commit | a5394c04a2ef67ee218b49d7d8319f9ed8bcbbe5 | [log] [tgz] |
---|---|---|
author | Ingy döt Net <ingy@ingy.net> | Tue Mar 19 10:34:39 2019 -0700 |
committer | Tina Müller <cpan2@tinita.de> | Mon Nov 18 11:59:54 2019 +0100 |
tree | 3ff0af720c317e71cafbef714e39412227f7bce5 | |
parent | 8d7a78003ae59752cb33e65d54cbc7b37f1fa359 [diff] |
Add custom constructors to multiple loaders When someone writes a subclass of the YAMLObject class, the constructors will now be added to all 3 (non-safe) loaders. Furthermore, we support the class variable `yaml_loader` being a list, offering more control of which loaders are affected. To support safe_load in your custom class you could add this: yaml_loader = yaml.SafeLoader yaml_loader = yaml.YAMLObject.yaml_loader yaml_loader.append(yaml.SafeLoader)