Refactored
This commit is contained in:
+6
-1
@@ -51,14 +51,19 @@ if __name__ == '__main__':
|
||||
last = {}
|
||||
for s in src:
|
||||
diffed = jay_diff_full(last, s, combine_upd_add=diff_mode_update_add)
|
||||
print(f"Old: {last}")
|
||||
print(f"New: {s}")
|
||||
print(f"Diffed: {diffed}")
|
||||
diffed_list.append(deepcopy(diffed))
|
||||
last = deepcopy(s)
|
||||
print(f"Diffed: {diffed}")
|
||||
|
||||
merged_list = []
|
||||
last = {}
|
||||
for d in diffed_list:
|
||||
merged = jay_merge_full(last, d)
|
||||
print(f"Old: {last}")
|
||||
print(f"Diff: {d}")
|
||||
print(f"Merged: {merged}")
|
||||
last = deepcopy(merged)
|
||||
merged_list.append(deepcopy(merged))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user