Skip to content

Commit

Permalink
Handling list merge in _utils.merge_dicts(). (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Jun 3, 2021
1 parent cf4eaad commit 494e98b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pylsp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def _merge_dicts_(a, b):
if key in a and key in b:
if isinstance(a[key], dict) and isinstance(b[key], dict):
yield (key, dict(_merge_dicts_(a[key], b[key])))
elif isinstance(a[key], list) and isinstance(b[key], list):
yield (key, list(set(a[key] + b[key])))
elif b[key] is not None:
yield (key, b[key])
else:
Expand Down

0 comments on commit 494e98b

Please sign in to comment.