fix bugs in builtins/2.7/*.pyi

This commit is contained in:
Matthias Kramm
2015-10-01 08:02:44 -07:00
parent 3f713101a5
commit a2f5703041
22 changed files with 77 additions and 58 deletions

View File

@@ -1,6 +1,7 @@
"""Stub file for the 'array' module."""
from typing import Any, Generic, IO, Iterable, Sequence, TypeVar, Union, overload
from typing import (Any, Generic, IO, Iterable, Sequence, TypeVar,
Union, overload, Iterator, Tuple, BinaryIO)
T = TypeVar('T')
@@ -42,7 +43,7 @@ class array(Generic[T]):
def index(self, x: T) -> int: ...
def insert(self, i: int, x: T) -> None: ...
def pop(self, i: int = ...) -> T: ...
def read(self, f: file, n: int) -> None:
def read(self, f: IO[str], n: int) -> None:
raise DeprecationWarning()
def remove(self, x: T) -> None: ...
def reverse(self) -> None: ...
@@ -51,5 +52,5 @@ class array(Generic[T]):
def tolist(self) -> List[T]: ...
def tostring(self) -> str: ...
def tounicode(self) -> unicode: ...
def write(self, f: file) -> None:
def write(self, f: IO[str]) -> None:
raise DeprecationWarning()