Backport more Self-related changes to Python 2 (#7166)

This commit is contained in:
Alex Waygood
2022-02-08 17:52:43 +00:00
committed by GitHub
parent 2381066c15
commit 5f830d023f
8 changed files with 29 additions and 32 deletions

View File

@@ -708,9 +708,9 @@ class set(MutableSet[_T], Generic[_T]):
def __contains__(self, o: object) -> bool: ...
def __iter__(self) -> Iterator[_T]: ...
def __and__(self, s: AbstractSet[object]) -> set[_T]: ...
def __iand__(self, s: AbstractSet[object]) -> set[_T]: ...
def __iand__(self: Self, s: AbstractSet[object]) -> Self: ...
def __or__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
def __ior__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
def __ior__(self: Self, s: AbstractSet[_T]) -> Self: ...
@overload
def __sub__(self: set[str], s: AbstractSet[Text | None]) -> set[_T]: ...
@overload
@@ -720,7 +720,7 @@ class set(MutableSet[_T], Generic[_T]):
@overload
def __isub__(self, s: AbstractSet[_T | None]) -> set[_T]: ...
def __xor__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
def __ixor__(self, s: AbstractSet[_S]) -> set[_T | _S]: ...
def __ixor__(self: Self, s: AbstractSet[_T]) -> Self: ...
def __le__(self, s: AbstractSet[object]) -> bool: ...
def __lt__(self, s: AbstractSet[object]) -> bool: ...
def __ge__(self, s: AbstractSet[object]) -> bool: ...