mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-18 09:55:59 +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
@@ -4,7 +4,7 @@
|
||||
|
||||
# Only a subset of functionality is included.
|
||||
|
||||
from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any, Union
|
||||
from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any, Union, Optional
|
||||
|
||||
DEFAULT_BUFFER_SIZE = 0
|
||||
|
||||
@@ -30,12 +30,12 @@ class BytesIO(BinaryIO):
|
||||
def readable(self) -> bool: ...
|
||||
def readline(self, limit: 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 seekable(self) -> bool: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int = ...) -> int: ...
|
||||
def truncate(self, size: Optional[int] = ...) -> int: ...
|
||||
def writable(self) -> bool: ...
|
||||
def write(self, s: str) -> None: ...
|
||||
def write(self, s: str) -> int: ...
|
||||
def writelines(self, lines: Iterable[str]) -> None: ...
|
||||
def getvalue(self) -> str: ...
|
||||
def read1(self) -> str: ...
|
||||
@@ -59,12 +59,12 @@ class StringIO(TextIO):
|
||||
def readable(self) -> bool: ...
|
||||
def readline(self, limit: int = ...) -> unicode: ...
|
||||
def readlines(self, hint: int = ...) -> List[unicode]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> None: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def seekable(self) -> bool: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int = ...) -> int: ...
|
||||
def truncate(self, size: Optional[int] = ...) -> int: ...
|
||||
def writable(self) -> bool: ...
|
||||
def write(self, s: unicode) -> None: ...
|
||||
def write(self, s: unicode) -> int: ...
|
||||
def writelines(self, lines: Iterable[unicode]) -> None: ...
|
||||
def getvalue(self) -> unicode: ...
|
||||
|
||||
@@ -89,12 +89,12 @@ class TextIOWrapper(TextIO):
|
||||
def readable(self) -> bool: ...
|
||||
def readline(self, limit: int = ...) -> unicode: ...
|
||||
def readlines(self, hint: int = ...) -> List[unicode]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> None: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def seekable(self) -> bool: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: int = ...) -> int: ...
|
||||
def truncate(self, size: Optional[int] = ...) -> int: ...
|
||||
def writable(self) -> bool: ...
|
||||
def write(self, s: unicode) -> None: ...
|
||||
def write(self, s: unicode) -> int: ...
|
||||
def writelines(self, lines: Iterable[unicode]) -> None: ...
|
||||
|
||||
def __iter__(self) -> Iterator[unicode]: ...
|
||||
|
||||
Reference in New Issue
Block a user