From 4b75ecbbe2baf600847b79c3e4c8ffd97ff6cae5 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 8 Feb 2022 18:54:16 +0000 Subject: [PATCH] Use `Self` in Python 2's `array.__imul__` (#7167) --- stdlib/@python2/__builtin__.pyi | 2 +- stdlib/@python2/array.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/@python2/__builtin__.pyi b/stdlib/@python2/__builtin__.pyi index f675020b8..b6ac2b78a 100644 --- a/stdlib/@python2/__builtin__.pyi +++ b/stdlib/@python2/__builtin__.pyi @@ -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: Self, s: AbstractSet[_S]) -> Self: ... + 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: ... diff --git a/stdlib/@python2/array.pyi b/stdlib/@python2/array.pyi index 81fee7972..1ef8c3a7c 100644 --- a/stdlib/@python2/array.pyi +++ b/stdlib/@python2/array.pyi @@ -54,7 +54,7 @@ class array(MutableSequence[_T], Generic[_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[override] - def __imul__(self, n: int) -> array[_T]: ... + def __imul__(self: Self, n: int) -> Self: ... def __le__(self, other: array[_T]) -> bool: ... def __lt__(self, other: array[_T]) -> bool: ... def __mul__(self, n: int) -> array[_T]: ...