From 556fe3e4ef0f00cd375b344f89dfe4ae6d7ce139 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sat, 16 Apr 2022 22:10:39 -0700 Subject: [PATCH] weakref: use positional-only args (#7653) Co-authored-by: hauntsaninja <> --- stdlib/_weakref.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/_weakref.pyi b/stdlib/_weakref.pyi index 00dc2d511..0a84f6926 100644 --- a/stdlib/_weakref.pyi +++ b/stdlib/_weakref.pyi @@ -28,10 +28,10 @@ class ReferenceType(Generic[_T]): ref = ReferenceType def getweakrefcount(__object: Any) -> int: ... -def getweakrefs(object: Any) -> list[Any]: ... -@overload -def proxy(object: _C, callback: Callable[[_C], Any] | None = ...) -> CallableProxyType[_C]: ... +def getweakrefs(__object: Any) -> list[Any]: ... # Return CallableProxyType if object is callable, ProxyType otherwise @overload -def proxy(object: _T, callback: Callable[[_T], Any] | None = ...) -> Any: ... +def proxy(__object: _C, __callback: Callable[[_C], Any] | None = ...) -> CallableProxyType[_C]: ... +@overload +def proxy(__object: _T, __callback: Callable[[_T], Any] | None = ...) -> Any: ...