Add a new set of defaults to the configuration It does two things: 1. Add the defaults to a global collection to be used by refresh later 2. Updates the global config with the new configuration. Old values are prioritized over new ones, unless the current value is the
(
new: Mapping, config: dict = config, defaults: list[Mapping] = defaults
)
| 681 | |
| 682 | |
| 683 | def update_defaults( |
| 684 | new: Mapping, config: dict = config, defaults: list[Mapping] = defaults |
| 685 | ) -> None: |
| 686 | """Add a new set of defaults to the configuration |
| 687 | |
| 688 | It does two things: |
| 689 | |
| 690 | 1. Add the defaults to a global collection to be used by refresh later |
| 691 | 2. Updates the global config with the new configuration. |
| 692 | Old values are prioritized over new ones, unless the current value |
| 693 | is the old default, in which case it's updated to the new default. |
| 694 | """ |
| 695 | current_defaults = merge(*defaults) |
| 696 | defaults.append(new) |
| 697 | update(config, new, priority="new-defaults", defaults=current_defaults) |
| 698 | |
| 699 | |
| 700 | def expand_environment_variables(config: Any) -> Any: |
searching dependent graphs…