Skip to content

Commit 1236ae4

Browse files
Create weakref.pyi
1 parent bd1d63a commit 1236ae4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test-data/unit/lib-stub/weakref.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from collections.abc import Callable
2+
from typing import Any, Generic, TypeVar
3+
from typing_extensions import Self
4+
5+
_T = TypeVar("_T")
6+
7+
class ReferenceType(Generic[_T]): # "weakref"
8+
__callback__: Callable[[Self], Any]
9+
def __new__(cls, o: _T, callback: Callable[[Self], Any] | None = ..., /) -> Self: ...
10+
11+
ref = ReferenceType

0 commit comments

Comments
 (0)