massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / sets.pyi
1 # Stubs for sets (Python 2)\r
2 from typing import Any, Callable, Hashable, Iterable, Iterator, MutableMapping, Optional, TypeVar, Union\r
3 \r
4 _T = TypeVar('_T')\r
5 _Setlike = Union[BaseSet[_T], Iterable[_T]]\r
6 _SelfT = TypeVar('_SelfT', bound=BaseSet)\r
7 \r
8 class BaseSet(Iterable[_T]):\r
9     def __init__(self) -> None: ...\r
10     def __len__(self) -> int: ...\r
11     def __repr__(self) -> str: ...\r
12     def __str__(self) -> str: ...\r
13     def __iter__(self) -> Iterator[_T]: ...\r
14     def __cmp__(self, other: Any) -> int: ...\r
15     def __eq__(self, other: Any) -> bool: ...\r
16     def __ne__(self, other: Any) -> bool: ...\r
17     def copy(self: _SelfT) -> _SelfT: ...\r
18     def __copy__(self: _SelfT) -> _SelfT: ...\r
19     def __deepcopy__(self: _SelfT, memo: MutableMapping[int, BaseSet[_T]]) -> _SelfT: ...\r
20     def __or__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...\r
21     def union(self: _SelfT, other: _Setlike) -> _SelfT: ...\r
22     def __and__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...\r
23     def intersection(self: _SelfT, other: _Setlike) -> _SelfT: ...\r
24     def __xor__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...\r
25     def symmetric_difference(self: _SelfT, other: _Setlike) -> _SelfT: ...\r
26     def __sub__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...\r
27     def difference(self: _SelfT, other: _Setlike) -> _SelfT: ...\r
28     def __contains__(self, element: Any) -> bool: ...\r
29     def issubset(self, other: BaseSet[_T]) -> bool: ...\r
30     def issuperset(self, other: BaseSet[_T]) -> bool: ...\r
31     def __le__(self, other: BaseSet[_T]) -> bool: ...\r
32     def __ge__(self, other: BaseSet[_T]) -> bool: ...\r
33     def __lt__(self, other: BaseSet[_T]) -> bool: ...\r
34     def __gt__(self, other: BaseSet[_T]) -> bool: ...\r
35 \r
36 class ImmutableSet(BaseSet[_T], Hashable):\r
37     def __init__(self, iterable: Optional[_Setlike] = ...) -> None: ...\r
38     def __hash__(self) -> int: ...\r
39 \r
40 class Set(BaseSet[_T]):\r
41     def __init__(self, iterable: Optional[_Setlike] = ...) -> None: ...\r
42     def __ior__(self, other: BaseSet[_T]) -> Set: ...\r
43     def union_update(self, other: _Setlike) -> None: ...\r
44     def __iand__(self, other: BaseSet[_T]) -> Set: ...\r
45     def intersection_update(self, other: _Setlike) -> None: ...\r
46     def __ixor__(self, other: BaseSet[_T]) -> Set: ...\r
47     def symmetric_difference_update(self, other: _Setlike) -> None: ...\r
48     def __isub__(self, other: BaseSet[_T]) -> Set: ...\r
49     def difference_update(self, other: _Setlike) -> None: ...\r
50     def update(self, iterable: _Setlike) -> None: ...\r
51     def clear(self) -> None: ...\r
52     def add(self, element: _T) -> None: ...\r
53     def remove(self, element: _T) -> None: ...\r
54     def discard(self, element: _T) -> None: ...\r
55     def pop(self) -> _T: ...\r
56     def __as_immutable__(self) -> ImmutableSet[_T]: ...\r
57     def __as_temporarily_immutable__(self) -> _TemporarilyImmutableSet[_T]: ...\r
58 \r
59 class _TemporarilyImmutableSet(BaseSet[_T]):\r
60     def __init__(self, set: BaseSet[_T]) -> None: ...\r
61     def __hash__(self) -> int: ...\r