File: _weakref.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (21 lines) | stat: -rw-r--r-- 629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from typing import Any, Callable, Generic, Optional, TypeVar

_T = TypeVar('_T')

class CallableProxyType(object):  # "weakcallableproxy"
    pass

class ProxyType(object):  # "weakproxy"
    pass

class ReferenceType(Generic[_T]):
    # TODO rest of members
    def __init__(self, o: _T, callback: Callable[[ReferenceType[_T]],
                                                 Any] = ...) -> None: ...
    def __call__(self) -> Optional[_T]: ...

ref = ReferenceType

def getweakrefcount(object: Any) -> int: ...
def getweakrefs(object: Any) -> int: ...
def proxy(object: Any, callback: Callable[[Any], Any] = ...) -> None: ...