fix: fix build error in context.py (#1595)

# What does this PR do?
This fixes the build error


## Test Plan
pre-commit run --all-files
check for merge
conflicts................................................Passed
trim trailing
whitespace.................................................Passed
check for added large
files..............................................Passed
fix end of
files.........................................................Passed
Insert license in
comments...............................................Passed

ruff.....................................................................Passed

ruff-format..............................................................Passed

blacken-docs.............................................................Passed

uv-lock..................................................................Passed

uv-export................................................................Passed

mypy.....................................................................Passed
Distribution Template
Codegen............................................Passed
This commit is contained in:
Dinesh Yeduguru 2025-03-12 13:26:23 -07:00 committed by GitHub
parent b7a9c45477
commit 0fdb15bcc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ def preserve_contexts_async_generator(
and we need to preserve the context across the event loop boundary. and we need to preserve the context across the event loop boundary.
""" """
async def wrapper(): async def wrapper() -> AsyncGenerator[T, None]:
while True: while True:
try: try:
item = await gen.__anext__() item = await gen.__anext__()