mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -15,13 +15,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[str], typecode: _UnicodeTypeCode, __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ...
|
||||
def __init__(self: array[str], 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: ...
|
||||
@@ -55,7 +55,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