Correct positional-only parameters in array.array (#6328)

This commit is contained in:
Alex Waygood
2021-11-17 14:35:55 +00:00
committed by GitHub
parent 906fe8bebd
commit 4db26e5841

View File

@@ -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