massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / _weakrefset.pyi
1 import sys
2 from typing import Any, Generic, Iterable, Iterator, MutableSet, TypeVar
3
4 if sys.version_info >= (3, 9):
5     from types import GenericAlias
6
7 _S = TypeVar("_S")
8 _T = TypeVar("_T")
9 _SelfT = TypeVar("_SelfT", bound=WeakSet[Any])
10
11 class WeakSet(MutableSet[_T], Generic[_T]):
12     def __init__(self, data: Iterable[_T] | None = ...) -> None: ...
13     def add(self, item: _T) -> None: ...
14     def clear(self) -> None: ...
15     def discard(self, item: _T) -> None: ...
16     def copy(self: _SelfT) -> _SelfT: ...
17     def pop(self) -> _T: ...
18     def remove(self, item: _T) -> None: ...
19     def update(self, other: Iterable[_T]) -> None: ...
20     def __contains__(self, item: object) -> bool: ...
21     def __len__(self) -> int: ...
22     def __iter__(self) -> Iterator[_T]: ...
23     def __ior__(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ...
24     def difference(self: _SelfT, other: Iterable[_T]) -> _SelfT: ...
25     def __sub__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ...
26     def difference_update(self, other: Iterable[_T]) -> None: ...
27     def __isub__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ...
28     def intersection(self: _SelfT, other: Iterable[_T]) -> _SelfT: ...
29     def __and__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ...
30     def intersection_update(self, other: Iterable[_T]) -> None: ...
31     def __iand__(self: _SelfT, other: Iterable[_T]) -> _SelfT: ...
32     def issubset(self, other: Iterable[_T]) -> bool: ...
33     def __le__(self, other: Iterable[_T]) -> bool: ...
34     def __lt__(self, other: Iterable[_T]) -> bool: ...
35     def issuperset(self, other: Iterable[_T]) -> bool: ...
36     def __ge__(self, other: Iterable[_T]) -> bool: ...
37     def __gt__(self, other: Iterable[_T]) -> bool: ...
38     def __eq__(self, other: object) -> bool: ...
39     def symmetric_difference(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ...
40     def __xor__(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ...
41     def symmetric_difference_update(self, other: Iterable[Any]) -> None: ...
42     def __ixor__(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ...
43     def union(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ...
44     def __or__(self, other: Iterable[_S]) -> WeakSet[_S | _T]: ...
45     def isdisjoint(self, other: Iterable[_T]) -> bool: ...
46     if sys.version_info >= (3, 9):
47         def __class_getitem__(cls, item: Any) -> GenericAlias: ...