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 types
from typing import IO, Any, Iterable, List, Tuple
from typing import IO, Any, Iterable
C_BUILTIN: int
C_EXTENSION: int
@@ -13,16 +13,16 @@ PY_SOURCE: int
SEARCH_ERROR: int
def acquire_lock() -> None: ...
def find_module(name: str, path: Iterable[str] = ...) -> Tuple[IO[Any], str, Tuple[str, str, int]] | None: ...
def find_module(name: str, path: Iterable[str] = ...) -> tuple[IO[Any], str, tuple[str, str, int]] | None: ...
def get_magic() -> str: ...
def get_suffixes() -> List[Tuple[str, str, int]]: ...
def get_suffixes() -> list[tuple[str, str, int]]: ...
def init_builtin(name: str) -> types.ModuleType: ...
def init_frozen(name: str) -> types.ModuleType: ...
def is_builtin(name: str) -> int: ...
def is_frozen(name: str) -> bool: ...
def load_compiled(name: str, pathname: str, file: IO[Any] = ...) -> types.ModuleType: ...
def load_dynamic(name: str, pathname: str, file: IO[Any] = ...) -> types.ModuleType: ...
def load_module(name: str, file: str, pathname: str, description: Tuple[str, str, int]) -> types.ModuleType: ...
def load_module(name: str, file: str, pathname: str, description: tuple[str, str, int]) -> types.ModuleType: ...
def load_source(name: str, pathname: str, file: IO[Any] = ...) -> types.ModuleType: ...
def lock_held() -> bool: ...
def new_module(name: str) -> types.ModuleType: ...