stdlib: correct many pos-or-kw arg names in dunder methods (#7451)

This commit is contained in:
Alex Waygood
2022-03-07 15:40:03 +00:00
committed by GitHub
parent 626ccdaee2
commit f4ae363b56
27 changed files with 153 additions and 162 deletions

View File

@@ -95,9 +95,9 @@ class UserList(MutableSequence[_T]):
@overload
def __getitem__(self: Self, i: slice) -> Self: ...
@overload
def __setitem__(self, i: SupportsIndex, o: _T) -> None: ...
def __setitem__(self, i: SupportsIndex, item: _T) -> None: ...
@overload
def __setitem__(self, i: slice, o: Iterable[_T]) -> None: ...
def __setitem__(self, i: slice, item: Iterable[_T]) -> None: ...
def __delitem__(self, i: SupportsIndex | slice) -> None: ...
def __add__(self: Self, other: Iterable[_T]) -> Self: ...
def __radd__(self: Self, other: Iterable[_T]) -> Self: ...
@@ -137,7 +137,7 @@ class UserString(Sequence[UserString]):
def __eq__(self, string: object) -> bool: ...
def __contains__(self, char: object) -> bool: ...
def __len__(self) -> int: ...
def __getitem__(self: Self, i: SupportsIndex | slice) -> Self: ...
def __getitem__(self: Self, index: SupportsIndex | slice) -> Self: ...
def __iter__(self: Self) -> Iterator[Self]: ...
def __reversed__(self: Self) -> Iterator[Self]: ...
def __add__(self: Self, other: object) -> Self: ...
@@ -373,9 +373,9 @@ class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
def new_child(self: Self, m: MutableMapping[_KT, _VT] | None = ...) -> Self: ...
@property
def parents(self: Self) -> Self: ...
def __setitem__(self, k: _KT, v: _VT) -> None: ...
def __delitem__(self, v: _KT) -> None: ...
def __getitem__(self, k: _KT) -> _VT: ...
def __setitem__(self, key: _KT, value: _VT) -> None: ...
def __delitem__(self, key: _KT) -> None: ...
def __getitem__(self, key: _KT) -> _VT: ...
def __iter__(self) -> Iterator[_KT]: ...
def __len__(self) -> int: ...
def __contains__(self, key: object) -> bool: ...