mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-05 17:37:41 +08:00
Avoid using string literals in type annotations (#2294)
This commit is contained in:
committed by
Jelle Zijlstra
parent
25ad95de4f
commit
6192cce9d9
@@ -85,7 +85,7 @@ class BytesIO(BinaryIO):
|
||||
# copied from IOBase
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __enter__(self) -> 'BytesIO': ...
|
||||
def __enter__(self) -> BytesIO: ...
|
||||
def __exit__(self, t: Optional[Type[BaseException]] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[TracebackType] = ...) -> bool: ...
|
||||
def close(self) -> None: ...
|
||||
@@ -186,7 +186,7 @@ class TextIOWrapper(TextIO):
|
||||
newlines = ... # type: Union[str, Tuple[str, ...], None]
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __next__(self) -> str: ...
|
||||
def __enter__(self) -> 'TextIO': ...
|
||||
def __enter__(self) -> TextIO: ...
|
||||
def detach(self) -> IOBase: ...
|
||||
def write(self, s: str) -> int: ...
|
||||
def readline(self, size: int = ...) -> str: ...
|
||||
@@ -202,7 +202,7 @@ class StringIO(TextIOWrapper):
|
||||
# as a read-only property on IO[].
|
||||
name: Any
|
||||
def getvalue(self) -> str: ...
|
||||
def __enter__(self) -> 'StringIO': ...
|
||||
def __enter__(self) -> StringIO: ...
|
||||
|
||||
class IncrementalNewlineDecoder(codecs.IncrementalDecoder):
|
||||
def decode(self, input: bytes, final: bool = ...) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user