MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / is_excluded

Function is_excluded

scripts/update_license_headers.py:102–116  ·  view source on GitHub ↗

Return True if a path should be skipped.

(rel: Path)

Source from the content-addressed store, hash-verified

100
101
102def is_excluded(rel: Path) -> bool:
103 """Return True if a path should be skipped."""
104 rel_str = str(rel)
105
106 # Exact filename exclusions.
107 if rel.name in EXCLUDE_FILES:
108 return True
109
110 # Directory exclusions.
111 for exc_dir in EXCLUDE_DIRS:
112 if rel_str == exc_dir or rel_str.startswith(exc_dir + "/"):
113 return True
114
115 # Prefix exclusions (CI config, editor config).
116 return any(rel_str.startswith(prefix) for prefix in EXCLUDE_DIR_PREFIXES)
117
118
119def git_candidate_files(root: Path) -> list[Path] | None:

Callers 2

discover_filesFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected