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

@@ -1,3 +1,4 @@
from _typeshed import Self
from typing import Any, BinaryIO, Generic, Iterable, MutableSequence, Text, TypeVar, Union, overload
from typing_extensions import Literal
@@ -52,7 +53,7 @@ class array(MutableSequence[_T], Generic[_T]):
def __add__(self, x: array[_T]) -> array[_T]: ...
def __ge__(self, other: array[_T]) -> bool: ...
def __gt__(self, other: array[_T]) -> bool: ...
def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence
def __iadd__(self: Self, x: array[_T]) -> Self: ... # type: ignore[override]
def __imul__(self, n: int) -> array[_T]: ...
def __le__(self, other: array[_T]) -> bool: ...
def __lt__(self, other: array[_T]) -> bool: ...