From 48cfde7b8c2b471cb7cdb48448970ff4be154759 Mon Sep 17 00:00:00 2001 From: Zephyrkul <23347632+Zephyrkul@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:13:54 -0700 Subject: [PATCH] Fix _ValueCtxManager.__await__ typehint (#6163) Co-authored-by: zephyrkul --- redbot/core/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/core/config.py b/redbot/core/config.py index 0e4cf1110..1126ce08b 100644 --- a/redbot/core/config.py +++ b/redbot/core/config.py @@ -9,6 +9,7 @@ from typing import ( AsyncContextManager, Awaitable, Dict, + Generator, MutableMapping, Optional, Tuple, @@ -96,7 +97,7 @@ class _ValueCtxManager(Awaitable[_T], AsyncContextManager[_T]): # pylint: disab self.__acquire_lock = acquire_lock self.__lock = self.value_obj.get_lock() - def __await__(self) -> _T: + def __await__(self) -> Generator[Any, None, _T]: return self.coro.__await__() async def __aenter__(self) -> _T: