You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Encountered strange behavior while comparing boolean and string values.
I was expecting deepdiff to behave in a somewhat symmetric fashion while exchanging first two arguments, but got a TypeError.
To Reproduce
import json
from deepdiff import DeepDiff
src = json.loads('{"default": true}')
dst = json.loads('{"default": "true"}')
# Works as expected:
# {'values_changed': {"root['default']": {'new_value': 'true', 'old_value': True}}}
diff = DeepDiff(src, dst,
ignore_type_in_groups=[(bool,str), (str,bool)],
ignore_string_type_changes=True)
print(diff)
# Throws
# TypeError: argument of type 'bool' is not iterable
# Expected something like: {'values_changed': {"root['default']": {'new_value': True, 'old_value': "true"}}}
diff = DeepDiff(dst, src,
ignore_type_in_groups=[(bool,str), (str,bool)],
ignore_string_type_changes=True)
print(diff)
Expected behavior
A clear and concise description of what you expected to happen.
OS, DeepDiff version and Python version (please complete the following information):
OS: Ubuntu 21.04
Python 3.9.5
Deepdiff 5.6.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Encountered strange behavior while comparing boolean and string values.
I was expecting deepdiff to behave in a somewhat symmetric fashion while exchanging first two arguments, but got a TypeError.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
OS, DeepDiff version and Python version (please complete the following information):
The text was updated successfully, but these errors were encountered: