From 12d9a68351b1e3c523cacff14fe4de9d29b9b170 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Sat, 22 Jan 2022 15:26:22 +0800 Subject: [PATCH] :bug: fix typing error for mutex --- nonebot/plugins/single_session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()