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

@@ -115,16 +115,16 @@ class SupportsItems(Protocol[_KT_co, _VT_co]):
# stable
class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):
def keys(self) -> Iterable[_KT]: ...
def __getitem__(self, __k: _KT) -> _VT_co: ...
def __getitem__(self, __key: _KT) -> _VT_co: ...
# stable
class SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):
def __getitem__(self, __k: _KT_contra) -> _VT_co: ...
def __getitem__(self, __key: _KT_contra) -> _VT_co: ...
# stable
class SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):
def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...
def __delitem__(self, __v: _KT_contra) -> None: ...
def __setitem__(self, __key: _KT_contra, __value: _VT) -> None: ...
def __delitem__(self, __key: _KT_contra) -> None: ...
StrPath: TypeAlias = str | PathLike[str] # stable
BytesPath: TypeAlias = bytes | PathLike[bytes] # stable