Remove redundant method redefinitions in builtins (#6545)

This commit is contained in:
Alex Waygood
2021-12-08 15:29:07 +00:00
committed by GitHub
parent ba2bfae4f9
commit 1718b77a1a

View File

@@ -772,7 +772,6 @@ class list(MutableSequence[_T], Generic[_T]):
def __init__(self) -> None: ...
@overload
def __init__(self, __iterable: Iterable[_T]) -> None: ...
def clear(self) -> None: ...
def copy(self) -> list[_T]: ...
def append(self, __object: _T) -> None: ...
def extend(self, __iterable: Iterable[_T]) -> None: ...
@@ -782,7 +781,6 @@ class list(MutableSequence[_T], Generic[_T]):
def count(self, __value: _T) -> int: ...
def insert(self, __index: SupportsIndex, __object: _T) -> None: ...
def remove(self, __value: _T) -> None: ...
def reverse(self) -> None: ...
# Signature of `list.sort` should be kept inline with `collections.UserList.sort()`
@overload
def sort(self: list[SupportsLessThanT], *, key: None = ..., reverse: bool = ...) -> None: ...
@@ -830,16 +828,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
@overload
def __init__(self: dict[str, str], __iterable: Iterable[list[str]]) -> None: ...
def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ...
def clear(self) -> None: ...
def copy(self) -> dict[_KT, _VT]: ...
def popitem(self) -> tuple[_KT, _VT]: ...
def setdefault(self, __key: _KT, __default: _VT = ...) -> _VT: ...
@overload
def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...
@overload
def update(self, __m: Iterable[tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
@overload
def update(self, **kwargs: _VT) -> None: ...
def keys(self) -> dict_keys[_KT, _VT]: ...
def values(self) -> dict_values[_KT, _VT]: ...
def items(self) -> dict_items[_KT, _VT]: ...
@@ -870,7 +859,6 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
class set(MutableSet[_T], Generic[_T]):
def __init__(self, __iterable: Iterable[_T] = ...) -> None: ...
def add(self, __element: _T) -> None: ...
def clear(self) -> None: ...
def copy(self) -> set[_T]: ...
def difference(self, *s: Iterable[Any]) -> set[_T]: ...
def difference_update(self, *s: Iterable[Any]) -> None: ...
@@ -880,7 +868,6 @@ class set(MutableSet[_T], Generic[_T]):
def isdisjoint(self, __s: Iterable[Any]) -> bool: ...
def issubset(self, __s: Iterable[Any]) -> bool: ...
def issuperset(self, __s: Iterable[Any]) -> bool: ...
def pop(self) -> _T: ...
def remove(self, __element: _T) -> None: ...
def symmetric_difference(self, __s: Iterable[_T]) -> set[_T]: ...
def symmetric_difference_update(self, __s: Iterable[_T]) -> None: ...