MCPcopy Index your code
hub / github.com/idank/explainshell / run_batch_collected

Function run_batch_collected

explainshell/extraction/runner.py:713–733  ·  view source on GitHub ↗

Like ``run_batch``, but collects per-file results into a list.

(
    extractor: BatchExtractor,
    gz_files: list[str],
    *,
    manifest: BatchManifestWriter,
    batch_size: int = 50,
    jobs: int = 1,
    on_start: Callable[[str], None] | None = None,
)

Source from the content-addressed store, hash-verified

711
712
713def run_batch_collected(
714 extractor: BatchExtractor,
715 gz_files: list[str],
716 *,
717 manifest: BatchManifestWriter,
718 batch_size: int = 50,
719 jobs: int = 1,
720 on_start: Callable[[str], None] | None = None,
721) -> tuple[BatchResult, list[ExtractionResult]]:
722 """Like ``run_batch``, but collects per-file results into a list."""
723 files: list[ExtractionResult] = []
724 batch = run_batch(
725 extractor,
726 gz_files,
727 batch_size=batch_size,
728 jobs=jobs,
729 on_start=on_start,
730 on_result=lambda _p, e: files.append(e),
731 manifest=manifest,
732 )
733 return batch, files

Calls 1

run_batchFunction · 0.85