Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)

This commit is contained in:
Alex Waygood
2022-01-18 15:14:03 +00:00
committed by GitHub
parent aa885ecd65
commit 8af5e0d340
264 changed files with 2217 additions and 2411 deletions

View File

@@ -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: ...