Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling authored and GitHub committed 2021-08-14 11:12:30 +02:00
1 parent 431c4f7fc1
commit ff63953188
235 files changed
+2473 -2768

No files matched your search

+7 -7
View File
@@ -1,6 +1,6 @@
from cProfile import Profile as _cProfile
from profile import Profile
from typing import IO, Any, Dict, Iterable, List, Optional, Text, Tuple, TypeVar, Union, overload
from typing import IO, Any, Dict, Iterable, List, Text, Tuple, TypeVar, Union, overload
_Selector = Union[str, float, int]
_T = TypeVar("_T", bound=Stats)
@@ -9,14 +9,14 @@ class Stats:
sort_arg_dict_default: Dict[str, Tuple[Any, str]]
def __init__(
self: _T,
__arg: Union[None, str, Text, Profile, _cProfile] = ...,
*args: Union[None, str, Text, Profile, _cProfile, _T],
stream: Optional[IO[Any]] = ...,
__arg: None | str | Text | Profile | _cProfile = ...,
*args: None | str | Text | Profile | _cProfile | _T,
stream: IO[Any] | None = ...,
) -> None: ...
def init(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ...
def load_stats(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ...
def init(self, arg: None | str | Text | Profile | _cProfile) -> None: ...
def load_stats(self, arg: None | str | Text | Profile | _cProfile) -> None: ...
def get_top_level_stats(self) -> None: ...
def add(self: _T, *arg_list: Union[None, str, Text, Profile, _cProfile, _T]) -> _T: ...
def add(self: _T, *arg_list: None | str | Text | Profile | _cProfile | _T) -> _T: ...
def dump_stats(self, filename: Text) -> None: ...
def get_sort_arg_defs(self) -> Dict[str, Tuple[Tuple[Tuple[int, int], ...], str]]: ...
@overload