MCPcopy Index your code
hub / github.com/python/cpython / InputWrapper

Class InputWrapper

Lib/wsgiref/validate.py:191–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189 return lint_app
190
191class InputWrapper:
192
193 def __init__(self, wsgi_input):
194 self.input = wsgi_input
195
196 def read(self, *args):
197 assert_(len(args) == 1)
198 v = self.input.read(*args)
199 assert_(type(v) is bytes)
200 return v
201
202 def readline(self, *args):
203 assert_(len(args) <= 1)
204 v = self.input.readline(*args)
205 assert_(type(v) is bytes)
206 return v
207
208 def readlines(self, *args):
209 assert_(len(args) <= 1)
210 lines = self.input.readlines(*args)
211 assert_(type(lines) is list)
212 for line in lines:
213 assert_(type(line) is bytes)
214 return lines
215
216 def __iter__(self):
217 while line := self.readline():
218 yield line
219
220 def close(self):
221 assert_(0, "input.close() must not be called")
222
223class ErrorWrapper:
224

Callers 1

lint_appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…