mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
stdlib mapping classes: Use better names for various pos-only parameters (#8637)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user