How to use the pathspec.patterns.GitWildMatchPattern function in pathspec

To help you get started, we’ve selected a few pathspec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pantsbuild / pants / tests / python / pants_test / base / test_filesystem_build_file.py View on Github external
def _create_ignore_spec(self, build_ignore_patterns):
    return PathSpec.from_lines(GitWildMatchPattern, build_ignore_patterns or [])
github iterative / dvc / dvc / ignore.py View on Github external
def __init__(self, ignore_file_path):
        assert os.path.isabs(ignore_file_path)

        self.ignore_file_path = ignore_file_path
        self.dirname = os.path.normpath(os.path.dirname(ignore_file_path))

        with open(ignore_file_path, encoding="utf-8") as fobj:
            self.ignore_spec = PathSpec.from_lines(GitWildMatchPattern, fobj)