mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Improve code readability of merge_dicts helper method
This commit is contained in:
parent
38aede68f2
commit
b83021a723
1 changed files with 3 additions and 3 deletions
|
@ -32,9 +32,9 @@ def get_from_dict(dictionary, *args):
|
|||
|
||||
def merge_dicts(priority_dict, default_dict):
|
||||
merged_dict = priority_dict.copy()
|
||||
for k, v in default_dict.items():
|
||||
if k not in priority_dict:
|
||||
merged_dict[k] = default_dict[k]
|
||||
for key, _ in default_dict.items():
|
||||
if key not in priority_dict:
|
||||
merged_dict[key] = default_dict[key]
|
||||
return merged_dict
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue