yaloader.loads#
- yaloader.loads(loaded_class: ~typing.Type | None = None, overwrite_tag: bool = False, yaml_loader: ~typing.Type[~yaloader.loader.YAMLConfigLoader] | None = <class 'yaloader.loader.YAMLConfigLoader'>, yaml_dumper: ~typing.Type[~yaloader.dumper.YAMLConfigDumper] | None = <class 'yaloader.dumper.YAMLConfigDumper'>) Callable[[Type[YAMLBaseConfig]], Type[YAMLBaseConfig]][source]#
A class decorator for yaml configs to add a simple load function for a given class.
A load function, which gets all attributes of the config and creates an instance of the given class with them as key word arguments, is added to the config.
- Parameters:
loaded_class – The class which should be loaded by this
- Returns:
The class decorator