diff --git a/nonebot/plugins/single_session.py b/nonebot/plugins/single_session.py index 11b5b6cc..9253bd02 100644 --- a/nonebot/plugins/single_session.py +++ b/nonebot/plugins/single_session.py @@ -1,4 +1,4 @@ -from typing import Dict, Generator +from typing import Dict, AsyncGenerator from nonebot.adapters import Event from nonebot.params import Depends @@ -7,7 +7,7 @@ from nonebot.message import IgnoredException, event_preprocessor _running_matcher: Dict[str, int] = {} -async def matcher_mutex(event: Event) -> Generator[bool, None, None]: +async def matcher_mutex(event: Event) -> AsyncGenerator[bool, None]: result = False try: session_id = event.get_session_id()