mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Add missing methods to ItemsView and KeysView, including isdisjoint (#2997)
This commit is contained in:
committed by
Sebastian Rittau
parent
38a7f14658
commit
07d4938251
@@ -312,8 +312,7 @@ class AbstractSet(_Collection[_T_co], Generic[_T_co]):
|
||||
def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ...
|
||||
def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ...
|
||||
def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ...
|
||||
# TODO: Argument can be a more general ABC?
|
||||
def isdisjoint(self, s: AbstractSet[Any]) -> bool: ...
|
||||
def isdisjoint(self, s: Iterable[Any]) -> bool: ...
|
||||
|
||||
class MutableSet(AbstractSet[_T], Generic[_T]):
|
||||
@abstractmethod
|
||||
@@ -334,17 +333,27 @@ class MappingView:
|
||||
|
||||
class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]):
|
||||
def __and__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __rand__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ...
|
||||
def __or__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __ror__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __sub__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __rsub__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __xor__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
def __rxor__(self, o: Iterable[_T]) -> AbstractSet[Union[Tuple[_KT_co, _VT_co], _T]]: ...
|
||||
|
||||
class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]):
|
||||
def __and__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __rand__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[_KT_co]: ...
|
||||
def __or__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __ror__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __sub__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __rsub__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __xor__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
def __rxor__(self, o: Iterable[_T]) -> AbstractSet[Union[_KT_co, _T]]: ...
|
||||
|
||||
class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]):
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user