See how [`pathspec`](https://pypi.org/project/pathspec/) does this.
See how
pathspecdoes this.