MCPcopy
hub / github.com/django/django / read

Method read

django/core/handlers/wsgi.py:29–40  ·  view source on GitHub ↗
(self, size=-1, /)

Source from the content-addressed store, hash-verified

27 self.limit = limit
28
29 def read(self, size=-1, /):
30 _pos = self._pos
31 limit = self.limit
32 if _pos >= limit:
33 return b""
34 if size == -1 or size is None:
35 size = limit - _pos
36 else:
37 size = min(size, limit - _pos)
38 data = self._read(size)
39 self._pos += len(data)
40 return data
41
42 def readline(self, size=-1, /):
43 _pos = self._pos

Callers 9

test_limited_streamMethod · 0.95
getMethod · 0.45
touchMethod · 0.45
file_move_safeFunction · 0.45
get_image_dimensionsFunction · 0.45
chunksMethod · 0.45
chunksMethod · 0.45
__init__Method · 0.45
closeMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_limited_streamMethod · 0.76