Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore_order=True stops flagging number type changes #485

Open
anatollius opened this issue Sep 11, 2024 · 1 comment
Open

ignore_order=True stops flagging number type changes #485

anatollius opened this issue Sep 11, 2024 · 1 comment
Labels

Comments

@anatollius
Copy link

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
@seperman seperman added the bug label Sep 12, 2024
@seperman
Copy link
Owner

Hi @anatollius Thanks for reporting a bug. I will take a look at it when I have a chance. PRs are always very welcome too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants