Skip to content

ignore_order=True stops flagging number type changes #485

Open
@anatollius

Description

@anatollius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions