mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
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:
committed by
Łukasz Langa
parent
37a854630c
commit
d43f3be914
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user