make format

This commit is contained in:
Suhas 2021-01-24 19:15:04 -05:00
parent 9540d34964
commit c31fa084f3
2 changed files with 5 additions and 6 deletions

View file

@ -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