|
|
|
@ -79,42 +79,3 @@ class ImmutableListProtocol(Protocol[T]): |
|
|
|
|
def index(self, item: T) -> int: ... |
|
|
|
|
|
|
|
|
|
def copy(self) -> typing.List[T]: ... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ImmutableSetProtocol(Protocol[T]): |
|
|
|
|
|
|
|
|
|
"""A protocol for a set that cannot be mutated. |
|
|
|
|
|
|
|
|
|
This provides for cases where mutation of the set is undesired. Although |
|
|
|
|
this will be allowed at runtime, mypy (or another type checker), will see |
|
|
|
|
any attempt to use mutative methods as an error. |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
def __iter__(self) -> typing.Iterator[T]: ... |
|
|
|
|
|
|
|
|
|
def __contains__(self, item: T) -> bool: ... |
|
|
|
|
|
|
|
|
|
def __len__(self) -> int: ... |
|
|
|
|
|
|
|
|
|
def __add__(self, other: typing.Set[T]) -> typing.Set[T]: ... |
|
|
|
|
|
|
|
|
|
def __eq__(self, other: typing.Any) -> bool: ... |
|
|
|
|
def __ne__(self, other: typing.Any) -> bool: ... |
|
|
|
|
def __le__(self, other: typing.Any) -> bool: ... |
|
|
|
|
def __lt__(self, other: typing.Any) -> bool: ... |
|
|
|
|
def __gt__(self, other: typing.Any) -> bool: ... |
|
|
|
|
def __ge__(self, other: typing.Any) -> bool: ... |
|
|
|
|
|
|
|
|
|
def copy(self) -> typing.Set[T]: ... |
|
|
|
|
|
|
|
|
|
def difference(self, other: typing.Set[T]) -> typing.Set[T]: ... |
|
|
|
|
|
|
|
|
|
def intersection(self, other: typing.Set[T]) -> typing.Set[T]: ... |
|
|
|
|
|
|
|
|
|
def issubset(self, other: typing.Set[T]) -> bool: ... |
|
|
|
|
|
|
|
|
|
def issuperset(self, other: typing.Set[T]) -> bool: ... |
|
|
|
|
|
|
|
|
|
def symmetric_difference(self, other: typing.Set[T]) -> typing.Set[T]: ... |
|
|
|
|
|
|
|
|
|
def union(self, other: typing.Set[T]) -> typing.Set[T]: ... |
|
|
|
|