mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Make AsyncExitStack.push_async_exit support __aexit__s returning Awaitable[None] (#8596)
Make push_async_exit support __aexit__'s returning Awaitable[None]
This commit is contained in:
@@ -148,7 +148,9 @@ class ExitStack(metaclass=abc.ABCMeta):
|
||||
self, __exc_type: type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
|
||||
) -> bool: ...
|
||||
|
||||
_ExitCoroFunc: TypeAlias = Callable[[type[BaseException] | None, BaseException | None, TracebackType | None], Awaitable[bool]]
|
||||
_ExitCoroFunc: TypeAlias = Callable[
|
||||
[type[BaseException] | None, BaseException | None, TracebackType | None], Awaitable[bool | None]
|
||||
]
|
||||
_ACM_EF = TypeVar("_ACM_EF", bound=AbstractAsyncContextManager[Any] | _ExitCoroFunc)
|
||||
|
||||
# In reality this is a subclass of `AbstractAsyncContextManager`;
|
||||
|
||||
Reference in New Issue
Block a user