Similar to MutableChain but for async iterables
| 324 | |
| 325 | |
| 326 | class MutableAsyncChain(AsyncIterator[_T]): |
| 327 | """ |
| 328 | Similar to MutableChain but for async iterables |
| 329 | """ |
| 330 | |
| 331 | def __init__(self, *args: Iterable[_T] | AsyncIterator[_T]): |
| 332 | self.data: AsyncIterator[_T] = _async_chain(*args) |
| 333 | |
| 334 | def extend(self, *iterables: Iterable[_T] | AsyncIterator[_T]) -> None: |
| 335 | self.data = _async_chain(self.data, _async_chain(*iterables)) |
| 336 | |
| 337 | def __aiter__(self) -> Self: |
| 338 | return self |
| 339 | |
| 340 | async def __anext__(self) -> _T: |
| 341 | return await self.data.__anext__() |
| 342 | |
| 343 | |
| 344 | def _looks_like_import_path(value: str) -> bool: |
no outgoing calls