pathspec
https://pypi.org/project/pathspec/
https://github.com/cpburnz/python-pathspec
Utility library for gitignore style pattern matching of file paths.
pathspec is a utility library for pattern matching of file paths.
So far this only includes Git’s wildmatch pattern matching which itself is derived from Rsync’s wildmatch.
There is a specialized class, pathspec.GitIgnoreSpec, which more closely implements the behavior of gitignore.
.gitignoreのファイルパスを除く、というようなことができそう(触りたい)