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
The parameter exclude_regex_paths does not work correctly with regular expressions including $
When I check the source code, I found the following code in diff.py line 481:
elif self.exclude_regex_paths and any(
[exclude_regex_path.search(level_path) for exclude_regex_path in self.exclude_regex_paths]):
skip = True
and the level_path will be like root['createTime']
So, if I want to match paths ending with time when using exclude_regex_paths, I have to use (?i).*time']$ or something like that.
To Reproduce
DeepDiff({"aTimea": 1}, {"aTimea": 2}, exclude_regex_paths=["(?i).*time$"])
and still get diff: {'values_changed': {"root['aTimea']": {'new_value': 2, 'old_value': 1}}}
OS, DeepDiff version and Python version (please complete the following information):
Python Version [3.12.2]
DeepDiff Version [7.0.1]
The text was updated successfully, but these errors were encountered:
Describe the bug
The parameter
exclude_regex_paths
does not work correctly with regular expressions including $When I check the source code, I found the following code in diff.py line 481:
and the level_path will be like
root['createTime']
So, if I want to match paths ending with
time
when using exclude_regex_paths, I have to use(?i).*time']$
or something like that.To Reproduce
DeepDiff({"aTimea": 1}, {"aTimea": 2}, exclude_regex_paths=["(?i).*time$"])
and still get diff: {'values_changed': {"root['aTimea']": {'new_value': 2, 'old_value': 1}}}
OS, DeepDiff version and Python version (please complete the following information):
The text was updated successfully, but these errors were encountered: