MCPcopy
hub / github.com/psf/black / path_is_excluded

Function path_is_excluded

src/black/files.py:312–317  ·  view source on GitHub ↗
(
    normalized_path: str,
    pattern: Pattern[str] | None,
)

Source from the content-addressed store, hash-verified

310
311
312def path_is_excluded(
313 normalized_path: str,
314 pattern: Pattern[str] | None,
315) -> bool:
316 match = pattern.search(normalized_path) if pattern else None
317 return bool(match and match.group(0))
318
319
320def gen_python_files(

Callers 2

get_sourcesFunction · 0.90
gen_python_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected