mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 00:16:13 +02:00
make format
This commit is contained in:
parent
9540d34964
commit
c31fa084f3
2 changed files with 5 additions and 6 deletions
|
@ -3,11 +3,11 @@ def apply_overrides(overrides: dict, base_config: dict) -> dict:
|
|||
config = base_config.copy()
|
||||
for k in overrides:
|
||||
nodes = k.split(".")
|
||||
config = recursively_apply(config, nodes, overrides[k])
|
||||
config = _recursively_apply(config, nodes, overrides[k])
|
||||
return config
|
||||
|
||||
|
||||
def recursively_apply(config: dict, nodes: list, override_value) -> dict:
|
||||
def _recursively_apply(config: dict, nodes: list, override_value) -> dict:
|
||||
"""Recurse through configuration and apply overrides at the leaf of the config tree
|
||||
|
||||
Credit to iJames on SO: https://stackoverflow.com/a/47276490 for algorithm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue