MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / interrupted

Function interrupted

tests/lib/tools/memory_sync/conftest.py:52–60  ·  view source on GitHub ↗
(memory_store_id: str, **kwargs: Any)

Source from the content-addressed store, hash-verified

50 real_list = stores._list_memories
51
52 async def interrupted(memory_store_id: str, **kwargs: Any) -> AsyncIterator[BetaManagedAgentsMemory]:
53 consumed = 0
54 async for item in real_list(memory_store_id, **kwargs):
55 yield item
56 consumed += 1
57 if consumed == after_items:
58 interrupt()
59 if after_items is None:
60 interrupt()
61
62 stores._list_memories = interrupted # type: ignore[method-assign]
63 try:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected