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))
def command_shortcut_representer(dumper: SafeDumper, data: CommandShortcutModel): return dumper.represent_dict(data.__dict__)