Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood
2021-12-28 10:31:43 +00:00
committed by GitHub
parent e6cb341d94
commit 8d5d2520ac
237 changed files with 966 additions and 1069 deletions

View File

@@ -2,7 +2,7 @@ import sys
from _typeshed import StrOrBytesPath
from cProfile import Profile as _cProfile
from profile import Profile
from typing import IO, Any, Iterable, Tuple, TypeVar, Union, overload
from typing import IO, Any, Iterable, TypeVar, Union, overload
_Selector = Union[str, float, int]
_T = TypeVar("_T", bound=Stats)
@@ -33,7 +33,7 @@ class Stats:
def get_top_level_stats(self) -> None: ...
def add(self: _T, *arg_list: None | str | Profile | _cProfile | _T) -> _T: ...
def dump_stats(self, filename: StrOrBytesPath) -> None: ...
def get_sort_arg_defs(self) -> dict[str, tuple[Tuple[tuple[int, int], ...], str]]: ...
def get_sort_arg_defs(self) -> dict[str, tuple[tuple[tuple[int, int], ...], str]]: ...
@overload
def sort_stats(self: _T, field: int) -> _T: ...
@overload