inveniosoftware / inveniosoftware/dictdiffer

Better control with swap, select which of (change/add/remove) to swap.

Open
#128 6 comments 0 reactions 0 assignees View on GitHub
Need: documentation
Dominant language
Python
Stars
849
Forks
99
PR merge metrics
No merged PRs in 30d

Description

I want to only swap add / remove of the diff, not change positions on all changes.
Or if i only wanted to change positions on changes for an example.
Any way to implement this?

data_old contains more keys than data_new.
i want to keep these old keys in the patch, but change values for newer values.

```
result = diff(data_old, data_new)
result = swap(result, 'remove') # I want to only swap remove to add, and not swap all changes.
patched = patch(result, data_old)
assert patched == data_old
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.