dicfg.configs.configvalue.ConfigValue#
- class ConfigValue(data: Any, updater: tuple[UpdaterAddon] | None = None, validator: tuple[ValidatorAddon] | None = None)[source]#
Bases:
object
Wraps a value into a ConfigValue
- Parameters:
data (Any) – value of the config
merger (Callable, optional) – Callable to merge the config value. Defaults to None.
- __init__(data: Any, updater: tuple[UpdaterAddon] | None = None, validator: tuple[ValidatorAddon] | None = None)[source]#
Methods
__init__
(data[, updater, validator])cast
()Cast wrapped value to builtin python value
factory
(data[, updater, validator, modifier])modify
(b)Merges config b with it self
validate
()Validate the config
- modify(b: ConfigValue) ConfigValue [source]#
Merges config b with it self
- Parameters:
b (ConfigValue) – another config
- Returns:
self
- Return type: