Mark some contextlib method arguments as positional-only (#6118)

This commit is contained in:
Kevin Rose
2021-10-05 21:41:52 -05:00
committed by GitHub
parent 47e9788246
commit 98dde9c364

View File

@@ -76,7 +76,7 @@ class ExitStack(ContextManager[ExitStack]):
def __init__(self) -> None: ...
def enter_context(self, cm: ContextManager[_T]) -> _T: ...
def push(self, exit: _CM_EF) -> _CM_EF: ...
def callback(self, callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ...
def callback(self, __callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ...
def pop_all(self: Self) -> Self: ...
def close(self) -> None: ...
def __enter__(self: Self) -> Self: ...
@@ -94,8 +94,8 @@ if sys.version_info >= (3, 7):
def enter_async_context(self, cm: AsyncContextManager[_T]) -> Awaitable[_T]: ...
def push(self, exit: _CM_EF) -> _CM_EF: ...
def push_async_exit(self, exit: _ACM_EF) -> _ACM_EF: ...
def callback(self, callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ...
def push_async_callback(self, callback: _CallbackCoroFunc, *args: Any, **kwds: Any) -> _CallbackCoroFunc: ...
def callback(self, __callback: Callable[..., Any], *args: Any, **kwds: Any) -> Callable[..., Any]: ...
def push_async_callback(self, __callback: _CallbackCoroFunc, *args: Any, **kwds: Any) -> _CallbackCoroFunc: ...
def pop_all(self: Self) -> Self: ...
def aclose(self) -> Awaitable[None]: ...
def __aenter__(self: Self) -> Awaitable[Self]: ...