pyufunc.is_path_ignored#
- pyufunc.is_path_ignored(path, patterns, *, root=None)#
Return whether a path matches gitignore-style patterns.
- Parameters:
path – Path to check.
patterns – A
pathspec.PathSpecinstance or iterable of patterns.root – Optional root used to relativize
pathbefore matching.
Note
Source package:
pathspec.Source repository: cpburnz/python-pathspec
Source document: https://python-path-specification.readthedocs.io/en/latest/index.html
Source license: Mozilla Public License 2.0.
Example
>>> is_path_ignored("build/out.txt", ["build/"]) True
- Returns:
True when the path is ignored.
- Return type: