File: array.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (56 lines) | stat: -rw-r--r-- 2,183 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""Stub file for the 'array' module."""

from typing import (Any, Generic, IO, Iterable, Sequence, TypeVar,
                    Union, overload, Iterator, Tuple, BinaryIO, List)

T = TypeVar('T')

class array(Generic[T]):
    def __init__(self, typecode: str, init: Iterable[T] = ...) -> None: ...
    def __add__(self, y: "array[T]") -> "array[T]": ...
    def __contains__(self, y: Any) -> bool: ...
    def __copy__(self) -> "array[T]": ...
    def __deepcopy__(self) -> "array": ...
    def __delitem__(self, y: Union[slice, int]) -> None: ...
    def __delslice__(self, i: int, j: int) -> None: ...
    @overload
    def __getitem__(self, i: int) -> Any: ...
    @overload
    def __getitem__(self, s: slice) -> "array": ...
    def __iadd__(self, y: "array[T]") -> "array[T]": ...
    def __imul__(self, y: int) -> "array[T]": ...
    def __iter__(self) -> Iterator[T]: ...
    def __len__(self) -> int: ...
    def __mul__(self, n: int) -> "array[T]": ...
    def __rmul__(self, n: int) -> "array[T]": ...
    @overload
    def __setitem__(self, i: int, y: T) -> None: ...
    @overload
    def __setitem__(self, i: slice, y: "array[T]") -> None: ...

    def append(self, x: T) -> None: ...
    def buffer_info(self) -> Tuple[int, int]: ...
    def byteswap(self) -> None:
        raise RuntimeError()
    def count(self) -> int: ...
    def extend(self, x: Sequence[T]) -> None: ...
    def fromlist(self, list: List[T]) -> None:
        raise EOFError()
        raise IOError()
    def fromfile(self, f: BinaryIO, n: int) -> None: ...
    def fromstring(self, s: str) -> None: ...
    def fromunicode(self, u: unicode) -> None: ...
    def index(self, x: T) -> int: ...
    def insert(self, i: int, x: T) -> None: ...
    def pop(self, i: int = ...) -> T: ...
    def read(self, f: IO[str], n: int) -> None:
        raise DeprecationWarning()
    def remove(self, x: T) -> None: ...
    def reverse(self) -> None: ...
    def tofile(self, f: BinaryIO) -> None:
        raise IOError()
    def tolist(self) -> List[T]: ...
    def tostring(self) -> str: ...
    def tounicode(self) -> unicode: ...
    def write(self, f: IO[str]) -> None:
        raise DeprecationWarning()