mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-08-01 22:59:53 +00:00
✨ 重构Caller类,移除泛型参数;添加函数签名复制装饰器
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
from typing import Any, Callable, Coroutine, TypeAlias
|
||||
from typing import Any, Callable, Coroutine, TypeAlias, TypeVar
|
||||
|
||||
SYNC_FUNCTION_CALL_FUNC: TypeAlias = Callable[..., str]
|
||||
ASYNC_FUNCTION_CALL_FUNC: TypeAlias = Callable[..., Coroutine[str, Any, str]]
|
||||
FUNCTION_CALL_FUNC: TypeAlias = SYNC_FUNCTION_CALL_FUNC | ASYNC_FUNCTION_CALL_FUNC
|
||||
|
||||
F = TypeVar("F", bound=FUNCTION_CALL_FUNC)
|
||||
|
Reference in New Issue
Block a user