We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd1d63a commit 1236ae4Copy full SHA for 1236ae4
test-data/unit/lib-stub/weakref.pyi
@@ -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