Skip to content

Commit

Permalink
Make operations on set take AbstractSet[object] (#1533)
Browse files Browse the repository at this point in the history
Previously they were `AbstractSet[Any]`
  • Loading branch information
ilinum authored and JelleZijlstra committed Aug 12, 2017
1 parent 46a73bb commit 4491e41
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
38 changes: 19 additions & 19 deletions stdlib/2/__builtin__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,9 @@ class set(MutableSet[_T], Generic[_T]):
def discard(self, element: _T) -> None: ...
def intersection(self, *s: Iterable[Any]) -> Set[_T]: ...
def intersection_update(self, *s: Iterable[Any]) -> None: ...
def isdisjoint(self, s: Iterable[Any]) -> bool: ...
def issubset(self, s: Iterable[Any]) -> bool: ...
def issuperset(self, s: Iterable[Any]) -> bool: ...
def isdisjoint(self, s: Iterable[object]) -> bool: ...
def issubset(self, s: Iterable[object]) -> bool: ...
def issuperset(self, s: Iterable[object]) -> bool: ...
def pop(self) -> _T: ...
def remove(self, element: _T) -> None: ...
def symmetric_difference(self, s: Iterable[_T]) -> Set[_T]: ...
Expand All @@ -613,18 +613,18 @@ class set(MutableSet[_T], Generic[_T]):
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[_T]: ...
def __str__(self) -> str: ...
def __and__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __iand__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __and__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __or__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __ior__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __sub__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __isub__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __sub__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __isub__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __xor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __ixor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __le__(self, s: AbstractSet[Any]) -> bool: ...
def __lt__(self, s: AbstractSet[Any]) -> bool: ...
def __ge__(self, s: AbstractSet[Any]) -> bool: ...
def __gt__(self, s: AbstractSet[Any]) -> bool: ...
def __le__(self, s: AbstractSet[object]) -> bool: ...
def __lt__(self, s: AbstractSet[object]) -> bool: ...
def __ge__(self, s: AbstractSet[object]) -> bool: ...
def __gt__(self, s: AbstractSet[object]) -> bool: ...
# TODO more set operations

class frozenset(AbstractSet[_T], Generic[_T]):
Expand All @@ -633,11 +633,11 @@ class frozenset(AbstractSet[_T], Generic[_T]):
@overload
def __init__(self, iterable: Iterable[_T]) -> None: ...
def copy(self) -> FrozenSet[_T]: ...
def difference(self, *s: Iterable[Any]) -> FrozenSet[_T]: ...
def intersection(self, *s: Iterable[Any]) -> FrozenSet[_T]: ...
def difference(self, *s: Iterable[object]) -> FrozenSet[_T]: ...
def intersection(self, *s: Iterable[object]) -> FrozenSet[_T]: ...
def isdisjoint(self, s: Iterable[_T]) -> bool: ...
def issubset(self, s: Iterable[Any]) -> bool: ...
def issuperset(self, s: Iterable[Any]) -> bool: ...
def issubset(self, s: Iterable[object]) -> bool: ...
def issuperset(self, s: Iterable[object]) -> bool: ...
def symmetric_difference(self, s: Iterable[_T]) -> FrozenSet[_T]: ...
def union(self, *s: Iterable[_T]) -> FrozenSet[_T]: ...
def __len__(self) -> int: ...
Expand All @@ -648,10 +648,10 @@ class frozenset(AbstractSet[_T], Generic[_T]):
def __or__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ...
def __sub__(self, s: AbstractSet[_T]) -> FrozenSet[_T]: ...
def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ...
def __le__(self, s: AbstractSet[Any]) -> bool: ...
def __lt__(self, s: AbstractSet[Any]) -> bool: ...
def __ge__(self, s: AbstractSet[Any]) -> bool: ...
def __gt__(self, s: AbstractSet[Any]) -> bool: ...
def __le__(self, s: AbstractSet[object]) -> bool: ...
def __lt__(self, s: AbstractSet[object]) -> bool: ...
def __ge__(self, s: AbstractSet[object]) -> bool: ...
def __gt__(self, s: AbstractSet[object]) -> bool: ...

class enumerate(Iterator[Tuple[int, _T]], Generic[_T]):
def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ...
Expand Down
38 changes: 19 additions & 19 deletions stdlib/3/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,10 @@ class set(MutableSet[_T], Generic[_T]):
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: ...
def difference(self, *s: Iterable[object]) -> Set[_T]: ...
def difference_update(self, *s: Iterable[object]) -> None: ...
def discard(self, element: _T) -> None: ...
def intersection(self, *s: Iterable[Any]) -> Set[_T]: ...
def intersection(self, *s: Iterable[object]) -> Set[_T]: ...
def intersection_update(self, *s: Iterable[Any]) -> None: ...
def isdisjoint(self, s: Iterable[Any]) -> bool: ...
def issubset(self, s: Iterable[Any]) -> bool: ...
Expand All @@ -683,28 +683,28 @@ class set(MutableSet[_T], Generic[_T]):
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[_T]: ...
def __str__(self) -> str: ...
def __and__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __iand__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __and__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __or__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __ior__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __sub__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __isub__(self, s: AbstractSet[Any]) -> Set[_T]: ...
def __sub__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __isub__(self, s: AbstractSet[object]) -> Set[_T]: ...
def __xor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __ixor__(self, s: AbstractSet[_S]) -> Set[Union[_T, _S]]: ...
def __le__(self, s: AbstractSet[Any]) -> bool: ...
def __lt__(self, s: AbstractSet[Any]) -> bool: ...
def __ge__(self, s: AbstractSet[Any]) -> bool: ...
def __gt__(self, s: AbstractSet[Any]) -> bool: ...
def __le__(self, s: AbstractSet[object]) -> bool: ...
def __lt__(self, s: AbstractSet[object]) -> bool: ...
def __ge__(self, s: AbstractSet[object]) -> bool: ...
def __gt__(self, s: AbstractSet[object]) -> bool: ...
# TODO more set operations

class frozenset(AbstractSet[_T], Generic[_T]):
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
def copy(self) -> FrozenSet[_T]: ...
def difference(self, *s: Iterable[Any]) -> FrozenSet[_T]: ...
def intersection(self, *s: Iterable[Any]) -> FrozenSet[_T]: ...
def difference(self, *s: Iterable[object]) -> FrozenSet[_T]: ...
def intersection(self, *s: Iterable[object]) -> FrozenSet[_T]: ...
def isdisjoint(self, s: Iterable[_T]) -> bool: ...
def issubset(self, s: Iterable[Any]) -> bool: ...
def issuperset(self, s: Iterable[Any]) -> bool: ...
def issubset(self, s: Iterable[object]) -> bool: ...
def issuperset(self, s: Iterable[object]) -> bool: ...
def symmetric_difference(self, s: Iterable[_T]) -> FrozenSet[_T]: ...
def union(self, *s: Iterable[_T]) -> FrozenSet[_T]: ...
def __len__(self) -> int: ...
Expand All @@ -715,10 +715,10 @@ class frozenset(AbstractSet[_T], Generic[_T]):
def __or__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ...
def __sub__(self, s: AbstractSet[_T]) -> FrozenSet[_T]: ...
def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[Union[_T, _S]]: ...
def __le__(self, s: AbstractSet[Any]) -> bool: ...
def __lt__(self, s: AbstractSet[Any]) -> bool: ...
def __ge__(self, s: AbstractSet[Any]) -> bool: ...
def __gt__(self, s: AbstractSet[Any]) -> bool: ...
def __le__(self, s: AbstractSet[object]) -> bool: ...
def __lt__(self, s: AbstractSet[object]) -> bool: ...
def __ge__(self, s: AbstractSet[object]) -> bool: ...
def __gt__(self, s: AbstractSet[object]) -> bool: ...

class enumerate(Iterator[Tuple[int, _T]], Generic[_T]):
def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ...
Expand Down

0 comments on commit 4491e41

Please sign in to comment.