stdlib mapping classes: Use better names for various pos-only parameters (#8637)

This commit is contained in:
Nikita Sobolev
2022-08-29 01:29:00 +03:00
committed by GitHub
parent 1b6cda86d4
commit 6e985ef3de
5 changed files with 14 additions and 14 deletions

View File

@@ -576,7 +576,7 @@ class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
# TODO: We wish the key type could also be covariant, but that doesn't work,
# see discussion in https://github.com/python/typing/pull/273.
@abstractmethod
def __getitem__(self, __k: _KT) -> _VT_co: ...
def __getitem__(self, __key: _KT) -> _VT_co: ...
# Mixin methods
@overload
def get(self, __key: _KT) -> _VT_co | None: ...
@@ -589,9 +589,9 @@ class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]):
@abstractmethod
def __setitem__(self, __k: _KT, __v: _VT) -> None: ...
def __setitem__(self, __key: _KT, __value: _VT) -> None: ...
@abstractmethod
def __delitem__(self, __v: _KT) -> None: ...
def __delitem__(self, __key: _KT) -> None: ...
def clear(self) -> None: ...
@overload
def pop(self, __key: _KT) -> _VT: ...