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

Function _make_sync_iterator

tests/test_client.py:93–97  ·  view source on GitHub ↗
(iterable: Iterable[T], counter: Optional[Counter] = None)

Source from the content-addressed store, hash-verified

91
92
93def _make_sync_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> Iterator[T]:
94 for item in iterable:
95 if counter:
96 counter.value += 1
97 yield item
98
99
100async def _make_async_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> AsyncIterator[T]:

Calls

no outgoing calls

Tested by

no test coverage detected