mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
48
stdlib/@python2/cStringIO.pyi
Normal file
48
stdlib/@python2/cStringIO.pyi
Normal file
@@ -0,0 +1,48 @@
|
||||
from abc import ABCMeta
|
||||
from types import TracebackType
|
||||
from typing import IO, Iterable, Iterator, List, Optional, Union, overload
|
||||
|
||||
# This class isn't actually abstract, but you can't instantiate it
|
||||
# directly, so we might as well treat it as abstract in the stub.
|
||||
class InputType(IO[str], Iterator[str], metaclass=ABCMeta):
|
||||
def getvalue(self) -> str: ...
|
||||
def close(self) -> None: ...
|
||||
@property
|
||||
def closed(self) -> bool: ...
|
||||
def flush(self) -> None: ...
|
||||
def isatty(self) -> bool: ...
|
||||
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 = ...) -> int: ...
|
||||
def tell(self) -> int: ...
|
||||
def truncate(self, size: Optional[int] = ...) -> int: ...
|
||||
def __iter__(self) -> InputType: ...
|
||||
def next(self) -> str: ...
|
||||
def reset(self) -> None: ...
|
||||
|
||||
class OutputType(IO[str], Iterator[str], metaclass=ABCMeta):
|
||||
@property
|
||||
def softspace(self) -> int: ...
|
||||
def getvalue(self) -> str: ...
|
||||
def close(self) -> None: ...
|
||||
@property
|
||||
def closed(self) -> bool: ...
|
||||
def flush(self) -> None: ...
|
||||
def isatty(self) -> bool: ...
|
||||
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 = ...) -> int: ...
|
||||
def tell(self) -> 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]) -> int: ...
|
||||
def writelines(self, lines: Iterable[Union[str, unicode]]) -> None: ...
|
||||
|
||||
@overload
|
||||
def StringIO() -> OutputType: ...
|
||||
@overload
|
||||
def StringIO(s: str) -> InputType: ...
|
||||
Reference in New Issue
Block a user