MCPcopy Create free account
hub / github.com/pallets/quart / make_conditional

Method make_conditional

src/quart/wrappers/response.py:230–235  ·  view source on GitHub ↗
(self, begin: int, end: int | None)

Source from the content-addressed store, hash-verified

228 raise StopAsyncIteration()
229
230 async def make_conditional(self, begin: int, end: int | None) -> int:
231 self.begin = begin
232 self.end = self.size if end is None else end
233 self.end = min(self.size, self.end)
234 _raise_if_invalid_range(self.begin, self.end, self.size)
235 return self.size
236
237
238class Response(SansIOResponse):

Callers 2

send_fileFunction · 0.45

Calls 1

_raise_if_invalid_rangeFunction · 0.85

Tested by

no test coverage detected