mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
committed by
Ivan Levkivskyi
parent
7c3edba6ce
commit
0393de4bd7
@@ -1,12 +1,15 @@
|
||||
# Stubs for cStringIO (Python 2.7)
|
||||
# See https://docs.python.org/2/library/stringio.html
|
||||
|
||||
from abc import ABCMeta
|
||||
from typing import overload, IO, List, Iterable, Iterator, Optional, Union
|
||||
from types import TracebackType
|
||||
|
||||
# TODO the typing.IO[] generics should be split into input and output.
|
||||
|
||||
class InputType(IO[str], Iterator[str]):
|
||||
# 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
|
||||
@@ -23,7 +26,8 @@ class InputType(IO[str], Iterator[str]):
|
||||
def next(self) -> str: ...
|
||||
def reset(self) -> None: ...
|
||||
|
||||
class OutputType(IO[str], Iterator[str]):
|
||||
|
||||
class OutputType(IO[str], Iterator[str], metaclass=ABCMeta):
|
||||
@property
|
||||
def softspace(self) -> int: ...
|
||||
def getvalue(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user