mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Add missing __init__ for ReferenceType (#12125)
This commit is contained in:
@@ -41,7 +41,10 @@ _P = ParamSpec("_P")
|
||||
ProxyTypes: tuple[type[Any], ...]
|
||||
|
||||
class WeakMethod(ref[_CallableT]):
|
||||
def __new__(cls, meth: _CallableT, callback: Callable[[Self], object] | None = None) -> Self: ...
|
||||
# `ref` is implemented in `C` so positional-only arguments are enforced, but not in `WeakMethod`.
|
||||
def __new__( # pyright: ignore[reportInconsistentConstructor]
|
||||
cls, meth: _CallableT, callback: Callable[[Self], Any] | None = None
|
||||
) -> Self: ...
|
||||
def __call__(self) -> _CallableT | None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
def __ne__(self, other: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user