From 98dde9c36453e53ee163c60001f3308d948c8b45 Mon Sep 17 00:00:00 2001 From: Kevin Rose Date: Tue, 5 Oct 2021 21:41:52 -0500 Subject: [PATCH] Mark some contextlib method arguments as positional-only (#6118) --- stdlib/contextlib.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/contextlib.pyi b/stdlib/contextlib.pyi index 69f625756..8c362cfd1 100644 --- a/stdlib/contextlib.pyi +++ b/stdlib/contextlib.pyi @@ -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]: ...