Skip to content

Commit 843a040

Browse files
committed
Revert "Merge pull request #2 from akshat62/tucdyf-codex/update-diff-behavior-for-item-movements"
This reverts commit ff5ddac, reversing changes made to 6068470.
1 parent ff5ddac commit 843a040

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

deepdiff/diff.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -896,9 +896,8 @@ def _diff_iterable_in_order(self, level, parents_ids=frozenset(), _original_type
896896
child_relationship_class=child_relationship_class,
897897
local_tree=local_tree_pass,
898898
)
899-
has_moves = bool(local_tree_pass['iterable_item_moved'])
900899
# Sometimes DeepDiff's old iterable diff does a better job than DeepDiff
901-
if len(local_tree_pass) > 1 and not has_moves:
900+
if len(local_tree_pass) > 1:
902901
local_tree_pass2 = TreeResult()
903902
self._diff_by_forming_pairs_and_comparing_one_by_one(
904903
level,
@@ -911,8 +910,6 @@ def _diff_iterable_in_order(self, level, parents_ids=frozenset(), _original_type
911910
local_tree_pass = local_tree_pass2
912911
else:
913912
self._iterable_opcodes[level.path(force=FORCE_DEFAULT)] = opcodes_with_values
914-
else:
915-
self._iterable_opcodes[level.path(force=FORCE_DEFAULT)] = opcodes_with_values
916913
for report_type, levels in local_tree_pass.items():
917914
if levels:
918915
self.tree[report_type] |= levels

0 commit comments

Comments
 (0)