| 189 | return lint_app |
| 190 | |
| 191 | class 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 | |
| 223 | class ErrorWrapper: |
| 224 |
no outgoing calls
no test coverage detected
searching dependent graphs…