Get env conf working with tests

This commit is contained in:
Kovid Goyal
2022-02-26 09:48:36 +05:30
parent 846021296f
commit 53c8485a7a
7 changed files with 131 additions and 23 deletions

View File

@@ -253,9 +253,10 @@ def load_config(
parse_config: Callable[[Iterable[str]], Dict[str, Any]],
merge_configs: Callable[[Dict[str, Any], Dict[str, Any]], Dict[str, Any]],
*paths: str,
overrides: Optional[Iterable[str]] = None
overrides: Optional[Iterable[str]] = None,
initialize_defaults: Callable[[Dict[str, Any]], Dict[str, Any]] = lambda x: x,
) -> Tuple[Dict[str, Any], Tuple[str, ...]]:
ans = defaults._asdict()
ans = initialize_defaults(defaults._asdict())
found_paths = []
for path in paths:
if not path: