fix: update type check for async generator in PipelineContext

This commit is contained in:
Soulter
2025-06-29 15:54:32 +08:00
parent 4e3d5641c8
commit 8e9c7544cf
+1 -1
View File
@@ -76,7 +76,7 @@ class PipelineContext:
# 以前的 handler 会额外传入一个参数, 但是 context 对象实际上在插件实例中有一份
ready_to_call = handler(event, self.plugin_manager.context, *args, **kwargs)
if isinstance(ready_to_call, T.AsyncGenerator):
if inspect.isasyncgen(ready_to_call):
_has_yielded = False
try:
async for ret in ready_to_call: