Skip to content

Commit 028089d

Browse files
author
Jonathan Hilliard
committed
Flagging type-only changes with DiffBuilder
1 parent ed43114 commit 028089d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jsonpatch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,17 +817,17 @@ def _compare_lists(self, path, src, dst):
817817
self._item_added(path, key, dst[key])
818818

819819
def _compare_values(self, path, key, src, dst):
820-
if src == dst:
821-
return
822-
823-
elif isinstance(src, MutableMapping) and \
820+
if isinstance(src, MutableMapping) and \
824821
isinstance(dst, MutableMapping):
825822
self._compare_dicts(_path_join(path, key), src, dst)
826823

827824
elif isinstance(src, MutableSequence) and \
828825
isinstance(dst, MutableSequence):
829826
self._compare_lists(_path_join(path, key), src, dst)
830827

828+
elif src == dst and type(src) == type(dst):
829+
return
830+
831831
else:
832832
self._item_replaced(path, key, dst)
833833

0 commit comments

Comments
 (0)