(lines: List[str], max_lines: int)
| 123 | |
| 124 | |
| 125 | def trim_chunk(lines: List[str], max_lines: int) -> List[str]: |
| 126 | if len(lines) <= max_lines: |
| 127 | return lines |
| 128 | return lines[:max_lines] |
| 129 | |
| 130 | |
| 131 | def sliding_chunks(lines: List[str], chunk_lines: int, overlap: int) -> Iterator[Tuple[int, List[str]]]: |