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,5 +1,5 @@
import sys
from typing import Callable, Iterable, Tuple
from typing import Callable, Iterable
if sys.platform != "win32":
_Reader = Callable[[int], bytes]
@@ -9,8 +9,8 @@ if sys.platform != "win32":
STDERR_FILENO: int
CHILD: int
def openpty() -> Tuple[int, int]: ...
def master_open() -> Tuple[int, str]: ...
def openpty() -> tuple[int, int]: ...
def master_open() -> tuple[int, str]: ...
def slave_open(tty_name: str) -> int: ...
def fork() -> Tuple[int, int]: ...
def fork() -> tuple[int, int]: ...
def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> None: ...