(subpath: str, fscache: FileSystemCache, verbose: bool)
| 708 | |
| 709 | |
| 710 | def matches_gitignore(subpath: str, fscache: FileSystemCache, verbose: bool) -> bool: |
| 711 | dir, _ = os.path.split(subpath) |
| 712 | for gi_path, gi_spec in find_gitignores(dir): |
| 713 | relative_path = os.path.relpath(subpath, gi_path) |
| 714 | if fscache.isdir(relative_path): |
| 715 | relative_path = relative_path + "/" |
| 716 | if gi_spec.match_file(relative_path): |
| 717 | if verbose: |
| 718 | print( |
| 719 | f"TRACE: Excluding {relative_path} (matches .gitignore) in {gi_path}", |
| 720 | file=sys.stderr, |
| 721 | ) |
| 722 | return True |
| 723 | return False |
| 724 | |
| 725 | |
| 726 | @functools.lru_cache |
no test coverage detected
searching dependent graphs…