diff --git a/stdlib/array.pyi b/stdlib/array.pyi index 460b12a0641c..dcd1429bf1a6 100644 --- a/stdlib/array.pyi +++ b/stdlib/array.pyi @@ -35,7 +35,7 @@ class array(MutableSequence[_T], Generic[_T]): if sys.version_info >= (3, 10): def index(self, __v: _T, __start: int = ..., __stop: int = ...) -> int: ... else: - def index(self, __v: _T) -> int: ... # type: ignore # Overrides Sequence + def index(self, __v: _T) -> int: ... # type: ignore[override] def insert(self, __i: int, __v: _T) -> None: ... def pop(self, __i: int = ...) -> _T: ... @@ -49,12 +49,13 @@ class array(MutableSequence[_T], Generic[_T]): def fromstring(self, __buffer: bytes) -> None: ... def tostring(self) -> bytes: ... + def __contains__(self, __key: object) -> bool: ... def __len__(self) -> int: ... @overload def __getitem__(self, __i: SupportsIndex) -> _T: ... @overload def __getitem__(self, __s: slice) -> array[_T]: ... - @overload # type: ignore # Overrides MutableSequence + @overload # type: ignore[override] def __setitem__(self, __i: SupportsIndex, __o: _T) -> None: ... @overload def __setitem__(self, __s: slice, __o: array[_T]) -> None: ... @@ -62,7 +63,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: Self, __x: array[_T]) -> Self: ... # type: ignore # Overrides MutableSequence + def __iadd__(self: Self, __x: array[_T]) -> Self: ... # type: ignore[override] def __imul__(self: Self, __n: int) -> Self: ... def __le__(self, __other: array[_T]) -> bool: ... def __lt__(self, __other: array[_T]) -> bool: ... diff --git a/stdlib/tracemalloc.pyi b/stdlib/tracemalloc.pyi index b377df1eca40..f3198f9414a3 100644 --- a/stdlib/tracemalloc.pyi +++ b/stdlib/tracemalloc.pyi @@ -43,6 +43,7 @@ class Frame: filename: str lineno: int def __init__(self, frame: _FrameTupleT) -> None: ... + def __eq__(self, other: object) -> bool: ... def __lt__(self, other: Frame) -> bool: ... if sys.version_info >= (3, 11): def __gt__(self, other: Frame) -> bool: ... diff --git a/stdlib/unittest/mock.pyi b/stdlib/unittest/mock.pyi index 2a2631a708e8..7b14b0f78250 100644 --- a/stdlib/unittest/mock.pyi +++ b/stdlib/unittest/mock.pyi @@ -94,6 +94,7 @@ class _Call(tuple[Any, ...]): def __ne__(self, __other: object) -> bool: ... def __call__(self, *args: Any, **kwargs: Any) -> _Call: ... def __getattr__(self, attr: Any) -> Any: ... + def __getattribute__(self, attr: str) -> Any: ... if sys.version_info >= (3, 8): @property def args(self): ...