MCPcopy Create free account
hub / github.com/FastLED/FastLED / find_candidates

Function find_candidates

ci/lint_python/keyboard_interrupt_checker.py:278–288  ·  view source on GitHub ↗

Read files and return those whose source matches the regex pre-filter.

(files: list[Path])

Source from the content-addressed store, hash-verified

276
277
278def find_candidates(files: list[Path]) -> list[tuple[Path, str]]:
279 """Read files and return those whose source matches the regex pre-filter."""
280 candidates: list[tuple[Path, str]] = []
281 for f in files:
282 try:
283 source = f.read_text(encoding="utf-8", errors="replace")
284 except OSError:
285 continue
286 if has_broad_except(source):
287 candidates.append((f, source))
288 return candidates
289
290
291# ---------------------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls 2

has_broad_exceptFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected