Skip to content

Use Any instead of object in the view types for __and__ and __sub__ #3294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stdlib/3/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -335,25 +335,25 @@ class MappingView:
def __len__(self) -> int: ...

class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]):
def __and__(self, o: Iterable[object]) -> Set[Tuple[_KT_co, _VT_co]]: ...
def __and__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ...
def __rand__(self, o: Iterable[_T]) -> Set[_T]: ...
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ...
def __or__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ...
def __ror__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ...
def __sub__(self, o: Iterable[object]) -> Set[Tuple[_KT_co, _VT_co]]: ...
def __sub__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ...
def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ...
def __xor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ...
def __rxor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ...

class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]):
def __and__(self, o: Iterable[object]) -> Set[_KT_co]: ...
def __and__(self, o: Iterable[Any]) -> Set[_KT_co]: ...
def __rand__(self, o: Iterable[_T]) -> Set[_T]: ...
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[_KT_co]: ...
def __or__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ...
def __ror__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ...
def __sub__(self, o: Iterable[object]) -> Set[_KT_co]: ...
def __sub__(self, o: Iterable[Any]) -> Set[_KT_co]: ...
def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ...
def __xor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ...
def __rxor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ...
Expand Down