Skip to content

Commit

Permalink
Flagging type-only changes with DiffBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Hilliard committed Jan 28, 2020
1 parent ed43114 commit 028089d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jsonpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,17 +817,17 @@ def _compare_lists(self, path, src, dst):
self._item_added(path, key, dst[key])

def _compare_values(self, path, key, src, dst):
if src == dst:
return

elif isinstance(src, MutableMapping) and \
if isinstance(src, MutableMapping) and \
isinstance(dst, MutableMapping):
self._compare_dicts(_path_join(path, key), src, dst)

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

elif src == dst and type(src) == type(dst):
return

else:
self._item_replaced(path, key, dst)

Expand Down

0 comments on commit 028089d

Please sign in to comment.