Add wildcard/glob pattern support for exclude_paths and include_paths#590
Add wildcard/glob pattern support for exclude_paths and include_paths#590akshat62 wants to merge 3 commits intoqlustered:devfrom
Conversation
|
Hi @akshat62 . The existing exclude_regex_paths should cover these. What is the benefit of supporting wildcard in exclude_paths and include_paths? |
|
Hi @seperman, Users don't need to learn a separate parameter - wildcards work directly in the existing The glob support targets the 80% of cases where users just want "this key at any depth" without needing to write regex. |
|
Regex operates on the string representation of paths, so a pattern like |
Adds
[*](match one segment) and[**](match zero or more segments) wildcard support to exclude_paths and include_paths across DeepDiff, DeepHash, and DeepSearch. Patterns are detected at init time, compiled into GlobPathMatcher objects, and checked alongside exact paths in _skip_this(). Quoted keys likeroot['*']are treated as literals, not wildcards.