Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc0de6 committed Nov 18, 2021
1 parent eb3cdbc commit 24b4352
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dotdrop/cfg_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,17 +1444,17 @@ def _merge_dict(cls, high, low, deep=False):
return {**low, **high}

final = high.copy()
for k, v in low.items():
if isinstance(v, dict):
for k, val in low.items():
if isinstance(val, dict):
# content is dict, recurse
if k not in final:
final[k] = {}
final[k] = cls._merge_dict(v, final[k], deep=True)
elif isinstance(v, list):
final[k] = cls._merge_dict(val, final[k], deep=True)
elif isinstance(val, list):
# content is list, merge
if k not in final:
final[k] = []
final[k] += v
final[k] += val
else:
# don't know how to handle
err = 'unable to merge'
Expand Down

0 comments on commit 24b4352

Please sign in to comment.