mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-16 03:24:54 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -51,10 +51,10 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
@overload
|
||||
def __init__(self: WeakValueDictionary[_KT, _VT], __other: Mapping[_KT, _VT] | Iterable[tuple[_KT, _VT]]) -> None: ...
|
||||
def __init__(self: WeakValueDictionary[_KT, _VT], other: Mapping[_KT, _VT] | Iterable[tuple[_KT, _VT]], /) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self: WeakValueDictionary[str, _VT], __other: Mapping[str, _VT] | Iterable[tuple[str, _VT]] = (), **kwargs: _VT
|
||||
self: WeakValueDictionary[str, _VT], other: Mapping[str, _VT] | Iterable[tuple[str, _VT]] = (), /, **kwargs: _VT
|
||||
) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, key: _KT) -> _VT: ...
|
||||
@@ -140,7 +140,7 @@ class WeakKeyDictionary(MutableMapping[_KT, _VT]):
|
||||
def __ior__(self, other: Iterable[tuple[_KT, _VT]]) -> Self: ...
|
||||
|
||||
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 __init__(self, obj: object, func: Callable[_P, Any], /, *args: _P.args, **kwargs: _P.kwargs) -> 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: ...
|
||||
|
||||
Reference in New Issue
Block a user