mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -12,13 +12,13 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
typecode: _TypeCode
|
||||
itemsize: int
|
||||
@overload
|
||||
def __init__(self: array[int], typecode: _IntTypeCode, __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ...
|
||||
def __init__(self: array[int], typecode: _IntTypeCode, __initializer: bytes | Iterable[_T] = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self: array[float], typecode: _FloatTypeCode, __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ...
|
||||
def __init__(self: array[float], typecode: _FloatTypeCode, __initializer: bytes | Iterable[_T] = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self: array[Text], typecode: _UnicodeTypeCode, __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ...
|
||||
def __init__(self: array[Text], typecode: _UnicodeTypeCode, __initializer: bytes | Iterable[_T] = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ...
|
||||
def __init__(self, typecode: str, __initializer: bytes | Iterable[_T] = ...) -> None: ...
|
||||
def append(self, __v: _T) -> None: ...
|
||||
def buffer_info(self) -> Tuple[int, int]: ...
|
||||
def byteswap(self) -> None: ...
|
||||
@@ -48,7 +48,7 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
def __setitem__(self, i: int, o: _T) -> None: ...
|
||||
@overload
|
||||
def __setitem__(self, s: slice, o: array[_T]) -> None: ...
|
||||
def __delitem__(self, i: Union[int, slice]) -> None: ...
|
||||
def __delitem__(self, i: int | slice) -> None: ...
|
||||
def __add__(self, x: array[_T]) -> array[_T]: ...
|
||||
def __ge__(self, other: array[_T]) -> bool: ...
|
||||
def __gt__(self, other: array[_T]) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user