mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
fix the __init__ of several C-classes (#13211)
This commit is contained in:
@@ -24,19 +24,21 @@ class array(MutableSequence[_T]):
|
||||
@property
|
||||
def itemsize(self) -> int: ...
|
||||
@overload
|
||||
def __init__(self: array[int], typecode: _IntTypeCode, initializer: bytes | bytearray | Iterable[int] = ..., /) -> None: ...
|
||||
def __new__(
|
||||
cls: type[array[int]], typecode: _IntTypeCode, initializer: bytes | bytearray | Iterable[int] = ..., /
|
||||
) -> array[int]: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self: array[float], typecode: _FloatTypeCode, initializer: bytes | bytearray | Iterable[float] = ..., /
|
||||
) -> None: ...
|
||||
def __new__(
|
||||
cls: type[array[float]], typecode: _FloatTypeCode, initializer: bytes | bytearray | Iterable[float] = ..., /
|
||||
) -> array[float]: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self: array[str], typecode: _UnicodeTypeCode, initializer: bytes | bytearray | Iterable[str] = ..., /
|
||||
) -> None: ...
|
||||
def __new__(
|
||||
cls: type[array[str]], typecode: _UnicodeTypeCode, initializer: bytes | bytearray | Iterable[str] = ..., /
|
||||
) -> array[str]: ...
|
||||
@overload
|
||||
def __init__(self, typecode: str, initializer: Iterable[_T], /) -> None: ...
|
||||
def __new__(cls, typecode: str, initializer: Iterable[_T], /) -> Self: ...
|
||||
@overload
|
||||
def __init__(self, typecode: str, initializer: bytes | bytearray = ..., /) -> None: ...
|
||||
def __new__(cls, typecode: str, initializer: bytes | bytearray = ..., /) -> Self: ...
|
||||
def append(self, v: _T, /) -> None: ...
|
||||
def buffer_info(self) -> tuple[int, int]: ...
|
||||
def byteswap(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user