Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Merge pull request #2 from akshat62/tucdyf-codex/update-diff-…
…behavior-for-item-movements"

This reverts commit ff5ddac, reversing
changes made to 6068470.
  • Loading branch information
akshat62 committed Aug 12, 2025
commit 843a040fd7165b5adba7c8c45c42c8fadc5c36c5
5 changes: 1 addition & 4 deletions deepdiff/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,8 @@ def _diff_iterable_in_order(self, level, parents_ids=frozenset(), _original_type
child_relationship_class=child_relationship_class,
local_tree=local_tree_pass,
)
has_moves = bool(local_tree_pass['iterable_item_moved'])
# Sometimes DeepDiff's old iterable diff does a better job than DeepDiff
if len(local_tree_pass) > 1 and not has_moves:
if len(local_tree_pass) > 1:
local_tree_pass2 = TreeResult()
self._diff_by_forming_pairs_and_comparing_one_by_one(
level,
Expand All @@ -911,8 +910,6 @@ def _diff_iterable_in_order(self, level, parents_ids=frozenset(), _original_type
local_tree_pass = local_tree_pass2
else:
self._iterable_opcodes[level.path(force=FORCE_DEFAULT)] = opcodes_with_values
else:
self._iterable_opcodes[level.path(force=FORCE_DEFAULT)] = opcodes_with_values
for report_type, levels in local_tree_pass.items():
if levels:
self.tree[report_type] |= levels
Expand Down
Loading