chore: import upstream snapshot with attribution
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run

This commit is contained in:
wehub-resource-sync
2026-07-13 13:21:23 +08:00
commit b957a53def
5423 changed files with 863745 additions and 0 deletions
@@ -0,0 +1,21 @@
# Copyright (c) Microsoft. All rights reserved.
import asyncio
from collections.abc import AsyncGenerator, AsyncIterable, Sequence
from typing import TypeVar
_T = TypeVar("_T")
async def desync_list(sync_list: Sequence[_T]) -> AsyncIterable[_T]: # noqa: RUF029
"""De synchronize a list of synchronous objects."""
for x in sync_list:
yield x
async def empty_generator() -> AsyncGenerator[_T, None]:
"""An empty generator, can be used to return an empty generator."""
if False:
yield None
await asyncio.sleep(0)