Unify stdlib/{2,3}/typing.pyi

Also fix signature of IO.seek, IO.truncate, IO.write, and MutableMapping.update
Fixes #1016

Note: I couldn't put typing.pyi in 2and3 because of an import cycle when adding `import sys` to 2/typing.pyi
This commit is contained in:
David Euresti
2017-03-17 16:02:06 -07:00
committed by Łukasz Langa
parent 37a854630c
commit d43f3be914
8 changed files with 55 additions and 36 deletions

View File

@@ -16,9 +16,9 @@ class InputType(IO[str], Iterator[str]):
def read(self, size: int = ...) -> str: ...
def readline(self, size: int = ...) -> str: ...
def readlines(self, hint: int = ...) -> List[str]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def seek(self, offset: int, whence: int = ...) -> int: ...
def tell(self) -> int: ...
def truncate(self, size: int = ...) -> Optional[int]: ...
def truncate(self, size: Optional[int] = ...) -> int: ...
def __iter__(self) -> 'InputType': ...
def next(self) -> str: ...
def reset(self) -> None: ...
@@ -35,13 +35,13 @@ class OutputType(IO[str], Iterator[str]):
def read(self, size: int = ...) -> str: ...
def readline(self, size: int = ...) -> str: ...
def readlines(self, hint: int = ...) -> List[str]: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def seek(self, offset: int, whence: int = ...) -> int: ...
def tell(self) -> int: ...
def truncate(self, size: int = ...) -> Optional[int]: ...
def truncate(self, size: Optional[int] = ...) -> int: ...
def __iter__(self) -> 'OutputType': ...
def next(self) -> str: ...
def reset(self) -> None: ...
def write(self, b: Union[str, unicode]) -> None: ...
def write(self, b: Union[str, unicode]) -> int: ...
def writelines(self, lines: Iterable[Union[str, unicode]]) -> None: ...
@overload