MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / _find_first_after

Function _find_first_after

benchmarking/insert_proton_records.py:188–193  ·  view source on GitHub ↗
(lines: list[str], pattern: str, after: int | None)

Source from the content-addressed store, hash-verified

186
187
188def _find_first_after(lines: list[str], pattern: str, after: int | None) -> int | None:
189 start = (after or 0) + 1
190 for i in range(start, len(lines)):
191 if pattern in lines[i]:
192 return i
193 return None
194
195
196def _find_last(lines: list[str], pattern: str) -> int | None:

Callers 1

_find_insertion_pointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected