MCPcopy
hub / github.com/scrapy/scrapy / _load_until_eof

Method _load_until_eof

tests/test_feedexport.py:242–254  ·  view source on GitHub ↗
(
        self, data: bytes, load_func: Callable[[IO[bytes]], Any]
    )

Source from the content-addressed store, hash-verified

240 pass
241
242 def _load_until_eof(
243 self, data: bytes, load_func: Callable[[IO[bytes]], Any]
244 ) -> list[Any]:
245 result: list[Any] = []
246 with tempfile.TemporaryFile() as temp:
247 temp.write(data)
248 temp.seek(0)
249 while True:
250 try:
251 result.append(load_func(temp))
252 except EOFError:
253 break
254 return result
255
256
257class InstrumentedFeedSlot(FeedSlot):

Callers 4

assertExportedPickleMethod · 0.80
assertExportedMarshalMethod · 0.80
assertExportedPickleMethod · 0.80
assertExportedMarshalMethod · 0.80

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected