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,13 +1,13 @@
from _typeshed import Self
from typing import Any, Callable, Dict, Text, Tuple, TypeVar
from typing import Any, Callable, Text, TypeVar
def run(statement: str, filename: str | None = ..., sort: str | int = ...) -> None: ...
def runctx(
statement: str, globals: Dict[str, Any], locals: Dict[str, Any], filename: str | None = ..., sort: str | int = ...
statement: str, globals: dict[str, Any], locals: dict[str, Any], filename: str | None = ..., sort: str | int = ...
) -> None: ...
_T = TypeVar("_T")
_Label = Tuple[str, int, str]
_Label = tuple[str, int, str]
class Profile:
bias: int
@@ -21,6 +21,6 @@ class Profile:
def create_stats(self) -> None: ...
def snapshot_stats(self) -> None: ...
def run(self: Self, cmd: str) -> Self: ...
def runctx(self: Self, cmd: str, globals: Dict[str, Any], locals: Dict[str, Any]) -> Self: ...
def runctx(self: Self, cmd: str, globals: dict[str, Any], locals: dict[str, Any]) -> Self: ...
def runcall(self, __func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ...
def calibrate(self, m: int, verbose: int = ...) -> float: ...