Fix _ValueCtxManager.__await__ typehint (#6163)

Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
This commit is contained in:
Zephyrkul 2023-07-19 13:13:54 -07:00 committed by GitHub
parent 8ee3ac9352
commit 48cfde7b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: