MCPcopy
hub / github.com/pallets/werkzeug / _next

Method _next

src/werkzeug/wsgi.py:413–425  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

411 return chunk, contextual_read_length
412
413 def _next(self) -> bytes:
414 if self.end_reached:
415 raise StopIteration()
416 chunk = None
417 contextual_read_length = self.read_length
418 if self.read_length == 0:
419 chunk, contextual_read_length = self._first_iteration()
420 if chunk is None:
421 chunk = self._next_chunk()
422 if self.end_byte is not None and self.read_length >= self.end_byte:
423 self.end_reached = True
424 return chunk[: self.end_byte - contextual_read_length]
425 return chunk
426
427 def __next__(self) -> bytes:
428 chunk = self._next()

Callers 3

__next__Method · 0.95
__next__Method · 0.80
__next__Method · 0.80

Calls 2

_first_iterationMethod · 0.95
_next_chunkMethod · 0.95

Tested by

no test coverage detected