Beispiel #1
0
def _dict_representer(dumper: yaml.SafeDumper, data: Any):
    """Represent the object as a dict created of (key, value) pairs."""
    return dumper.represent_dict(iter(data))
Beispiel #2
0
def command_shortcut_representer(dumper: SafeDumper,
                                 data: CommandShortcutModel):
    return dumper.represent_dict(data.__dict__)