Skip to content

Commit

Permalink
fix: merge directory based on the types of source
Browse files Browse the repository at this point in the history
Fix #2198

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Aug 29, 2023
1 parent 06c7497 commit f66438a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pdm/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,9 @@ def merge_dictionary(target: MutableMapping[Any, Any], input: Mapping[Any, Any],
for key, value in input.items():
if key not in target:
target[key] = value
elif isinstance(value, dict):
elif isinstance(target[key], dict):
merge_dictionary(target[key], value, append_array=append_array)
elif isinstance(value, list) and append_array:
elif isinstance(target[key], list) and append_array:
target[key].extend(x for x in value if x not in target[key])
if hasattr(target[key], "multiline"):
target[key].multiline(True) # type: ignore[attr-defined]
Expand Down

0 comments on commit f66438a

Please sign in to comment.