Allow ExitStack.push callbacks to return None (#7090)

This commit is contained in:
Jelle Zijlstra
2022-01-30 23:21:32 -08:00
committed by GitHub
parent b88a6f19cd
commit 2b72dea679

View File

@@ -31,7 +31,7 @@ _T_io = TypeVar("_T_io", bound=Optional[IO[str]])
_F = TypeVar("_F", bound=Callable[..., Any])
_P = ParamSpec("_P")
_ExitFunc = Callable[[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]], bool]
_ExitFunc = Callable[[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]], Optional[bool]]
_CM_EF = TypeVar("_CM_EF", AbstractContextManager[Any], _ExitFunc)
class ContextDecorator: