mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, Self, SupportsRead, SupportsWrite
|
||||
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
|
||||
from collections.abc import Iterable
|
||||
|
||||
# pytype crashes if array inherits from collections.abc.MutableSequence instead of typing.MutableSequence
|
||||
from typing import Any, Generic, MutableSequence, TypeVar, overload # noqa: Y022
|
||||
from typing_extensions import Literal, SupportsIndex, TypeAlias
|
||||
from typing_extensions import Literal, Self, SupportsIndex, TypeAlias
|
||||
|
||||
_IntTypeCode: TypeAlias = Literal["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q"]
|
||||
_FloatTypeCode: TypeAlias = Literal["f", "d"]
|
||||
@@ -72,8 +72,8 @@ 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[override]
|
||||
def __imul__(self: Self, __n: int) -> Self: ...
|
||||
def __iadd__(self, __x: array[_T]) -> Self: ... # type: ignore[override]
|
||||
def __imul__(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]: ...
|
||||
|
||||
Reference in New Issue
Block a user