deepdiff icon indicating copy to clipboard operation
deepdiff copied to clipboard

ignore_order=True stops flagging number type changes

Open anatollius opened this issue 1 year ago • 1 comments

Describe the bug When ignore_order=True, DeepDiff doesn't recognise type changes between integers and floats.

To Reproduce

>>> DeepDiff([{"a":1}], [{"a": 1.0}], ignore_order=True)
{}

Expected behavior It should recognise the type change as a difference as it does when ignore_order=False

>>> DeepDiff([{"a":1}], [{"a": 1.0}]) # Type change is recognised
{'type_changes': {"root[0]['a']": {
    'old_type': <class 'int'>, 'new_type': <class 'float'>,
    'old_value': 1, 'new_value': 1.0
}}}

OS, DeepDiff version and Python version (please complete the following information):

  • OS: MacOS
  • Version 14.6.1
  • Python Version 3.11.8
  • DeepDiff Version 8.0.1

anatollius avatar Sep 11 '24 13:09 anatollius