mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import IO, Any, AnyStr, Generic, Iterable, Iterator, List
|
||||
from typing import IO, Any, AnyStr, Generic, Iterable, Iterator
|
||||
|
||||
class StringIO(IO[AnyStr], Generic[AnyStr]):
|
||||
closed: bool
|
||||
@@ -14,7 +14,7 @@ class StringIO(IO[AnyStr], Generic[AnyStr]):
|
||||
def tell(self) -> int: ...
|
||||
def read(self, n: int = ...) -> AnyStr: ...
|
||||
def readline(self, length: int = ...) -> AnyStr: ...
|
||||
def readlines(self, sizehint: int = ...) -> List[AnyStr]: ...
|
||||
def readlines(self, sizehint: int = ...) -> list[AnyStr]: ...
|
||||
def truncate(self, size: int | None = ...) -> int: ...
|
||||
def write(self, s: AnyStr) -> int: ...
|
||||
def writelines(self, iterable: Iterable[AnyStr]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user