mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Correct positional-only parameters in array.array (#6328)
This commit is contained in:
@@ -15,11 +15,11 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
typecode: _TypeCode
|
||||
itemsize: int
|
||||
@overload
|
||||
def __init__(self: array[int], typecode: _IntTypeCode, __initializer: 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: 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: bytes | Iterable[_T] = ...) -> None: ...
|
||||
def __init__(self: array[str], __typecode: _UnicodeTypeCode, __initializer: bytes | Iterable[_T] = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, typecode: str, __initializer: bytes | Iterable[_T] = ...) -> None: ...
|
||||
def append(self, __v: _T) -> None: ...
|
||||
@@ -48,22 +48,22 @@ class array(MutableSequence[_T], Generic[_T]):
|
||||
def tostring(self) -> bytes: ...
|
||||
def __len__(self) -> int: ...
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> _T: ...
|
||||
def __getitem__(self, __i: int) -> _T: ...
|
||||
@overload
|
||||
def __getitem__(self, s: slice) -> array[_T]: ...
|
||||
def __getitem__(self, __s: slice) -> array[_T]: ...
|
||||
@overload # type: ignore # Overrides MutableSequence
|
||||
def __setitem__(self, i: int, o: _T) -> None: ...
|
||||
def __setitem__(self, __i: int, __o: _T) -> None: ...
|
||||
@overload
|
||||
def __setitem__(self, s: slice, o: array[_T]) -> 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: ...
|
||||
def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence
|
||||
def __imul__(self, n: int) -> array[_T]: ...
|
||||
def __le__(self, other: array[_T]) -> bool: ...
|
||||
def __lt__(self, other: array[_T]) -> bool: ...
|
||||
def __mul__(self, n: int) -> array[_T]: ...
|
||||
def __rmul__(self, n: int) -> array[_T]: ...
|
||||
def __setitem__(self, __s: slice, __o: array[_T]) -> 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: ...
|
||||
def __iadd__(self, __x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence
|
||||
def __imul__(self, __n: int) -> array[_T]: ...
|
||||
def __le__(self, __other: array[_T]) -> bool: ...
|
||||
def __lt__(self, __other: array[_T]) -> bool: ...
|
||||
def __mul__(self, __n: int) -> array[_T]: ...
|
||||
def __rmul__(self, __n: int) -> array[_T]: ...
|
||||
|
||||
ArrayType = array
|
||||
|
||||
Reference in New Issue
Block a user