From 4029e8d6eb904cb5e95ff1723a8f78991c9e8c71 Mon Sep 17 00:00:00 2001 From: Utsav <39943143+utsav00@users.noreply.github.com> Date: Sun, 21 Feb 2021 20:39:10 +0530 Subject: [PATCH] Updated: return type for getweakrefs (#5046) Fixes #4999 --- stdlib/_weakref.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/_weakref.pyi b/stdlib/_weakref.pyi index 5b4870229..339fe7335 100644 --- a/stdlib/_weakref.pyi +++ b/stdlib/_weakref.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any, Callable, Generic, Optional, TypeVar, overload +from typing import Any, Callable, Generic, List, Optional, TypeVar, overload if sys.version_info >= (3, 9): from types import GenericAlias @@ -25,7 +25,7 @@ class ReferenceType(Generic[_T]): ref = ReferenceType def getweakrefcount(__object: Any) -> int: ... -def getweakrefs(object: Any) -> int: ... +def getweakrefs(object: Any) -> List[Any]: ... @overload def proxy(object: _C, callback: Optional[Callable[[_C], Any]] = ...) -> CallableProxyType: ...