massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / _weakref.pyi
1 import sys\r
2 from typing import Any, Callable, Generic, Optional, TypeVar\r
3 \r
4 _T = TypeVar('_T')\r
5 \r
6 class CallableProxyType(object):  # "weakcallableproxy"\r
7     def __getattr__(self, attr: str) -> Any: ...\r
8 \r
9 class ProxyType(object):  # "weakproxy"\r
10     def __getattr__(self, attr: str) -> Any: ...\r
11 \r
12 class ReferenceType(Generic[_T]):\r
13     if sys.version_info >= (3, 4):\r
14         __callback__: Callable[[ReferenceType[_T]], Any]\r
15     def __init__(self, o: _T, callback: Callable[[ReferenceType[_T]],\r
16                                                  Any] = ...) -> None: ...\r
17     def __call__(self) -> Optional[_T]: ...\r
18     def __hash__(self) -> int: ...\r
19 \r
20 ref = ReferenceType\r
21 \r
22 def getweakrefcount(object: Any) -> int: ...\r
23 def getweakrefs(object: Any) -> int: ...\r
24 def proxy(object: _T, callback: Callable[[_T], Any] = ...) -> ref[_T]: ...\r