stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -41,7 +41,7 @@ _P = ParamSpec("_P")
ProxyTypes: tuple[type[Any], ...]
class WeakMethod(ref[_CallableT], Generic[_CallableT]):
def __new__(cls: type[Self], meth: _CallableT, callback: Callable[[_CallableT], object] | None = ...) -> Self: ...
def __new__(cls: type[Self], meth: _CallableT, callback: Callable[[_CallableT], object] | None = None) -> Self: ...
def __call__(self) -> _CallableT | None: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
@@ -125,7 +125,7 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
class finalize: # TODO: This is a good candidate for to be a `Generic[_P, _T]` class
def __init__(self, __obj: object, __func: Callable[_P, Any], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
def __call__(self, _: Any = ...) -> Any | None: ...
def __call__(self, _: Any = None) -> Any | None: ...
def detach(self) -> tuple[Any, Any, tuple[Any, ...], dict[str, Any]] | None: ...
def peek(self) -> tuple[Any, Any, tuple[Any, ...], dict[str, Any]] | None: ...
@property