fix(agenton): use AsyncGenerator return annotation for asynccontextmanager (#36361)

Co-authored-by: Arya Rizky <algojogacor@users.noreply.github.com>
This commit is contained in:
arya rizky
2026-05-19 13:19:35 +07:00
committed by GitHub
parent b04b4449db
commit a13ab76002

View File

@@ -14,7 +14,7 @@ hydrated deterministically.
"""
from collections import OrderedDict
from collections.abc import AsyncIterator, Mapping, Sequence
from collections.abc import AsyncGenerator, Mapping, Sequence
from contextlib import asynccontextmanager
from dataclasses import dataclass
from typing import Any, Generic, cast
@@ -178,7 +178,7 @@ class Compositor(Generic[PromptT, ToolT, LayerPromptT, LayerToolT, UserPromptT,
*,
configs: Mapping[str, LayerConfigInput] | None = None,
session_snapshot: CompositorSessionSnapshotValue | None = None,
) -> AsyncIterator[CompositorRun[PromptT, ToolT, LayerPromptT, LayerToolT, UserPromptT, LayerUserPromptT]]:
) -> AsyncGenerator[CompositorRun[PromptT, ToolT, LayerPromptT, LayerToolT, UserPromptT, LayerUserPromptT]]:
"""Create a fresh run, enter layers in graph order, and yield it.
Configs are keyed by layer node name and validated before factories run.