(self)
| 397 | raise |
| 398 | |
| 399 | def _first_iteration(self) -> tuple[bytes | None, int]: |
| 400 | chunk = None |
| 401 | if self.seekable: |
| 402 | self.iterable.seek(self.start_byte) # type: ignore |
| 403 | self.read_length = self.iterable.tell() # type: ignore |
| 404 | contextual_read_length = self.read_length |
| 405 | else: |
| 406 | while self.read_length <= self.start_byte: |
| 407 | chunk = self._next_chunk() |
| 408 | if chunk is not None: |
| 409 | chunk = chunk[self.start_byte - self.read_length :] |
| 410 | contextual_read_length = self.start_byte |
| 411 | return chunk, contextual_read_length |
| 412 | |
| 413 | def _next(self) -> bytes: |
| 414 | if self.end_reached: |
no test coverage detected