2 from _typeshed import StrOrBytesPath
3 from cProfile import Profile as _cProfile
4 from profile import Profile
5 from typing import IO, Any, Iterable, Tuple, TypeVar, Union, overload
7 _Selector = Union[str, float, int]
8 _T = TypeVar("_T", bound=Stats)
10 if sys.version_info >= (3, 7):
12 class SortKey(str, Enum):
24 sort_arg_dict_default: dict[str, tuple[Any, str]]
27 __arg: None | str | Profile | _cProfile = ...,
28 *args: None | str | Profile | _cProfile | _T,
29 stream: IO[Any] | None = ...,
31 def init(self, arg: None | str | Profile | _cProfile) -> None: ...
32 def load_stats(self, arg: None | str | Profile | _cProfile) -> None: ...
33 def get_top_level_stats(self) -> None: ...
34 def add(self: _T, *arg_list: None | str | Profile | _cProfile | _T) -> _T: ...
35 def dump_stats(self, filename: StrOrBytesPath) -> None: ...
36 def get_sort_arg_defs(self) -> dict[str, tuple[Tuple[tuple[int, int], ...], str]]: ...
38 def sort_stats(self: _T, field: int) -> _T: ...
40 def sort_stats(self: _T, *field: str) -> _T: ...
41 def reverse_order(self: _T) -> _T: ...
42 def strip_dirs(self: _T) -> _T: ...
43 def calc_callees(self) -> None: ...
44 def eval_print_amount(self, sel: _Selector, list: list[str], msg: str) -> tuple[list[str], str]: ...
45 def get_print_list(self, sel_list: Iterable[_Selector]) -> tuple[int, list[str]]: ...
46 def print_stats(self: _T, *amount: _Selector) -> _T: ...
47 def print_callees(self: _T, *amount: _Selector) -> _T: ...
48 def print_callers(self: _T, *amount: _Selector) -> _T: ...
49 def print_call_heading(self, name_size: int, column_title: str) -> None: ...
50 def print_call_line(self, name_size: int, source: str, call_dict: dict[str, Any], arrow: str = ...) -> None: ...
51 def print_title(self) -> None: ...
52 def print_line(self, func: str) -> None: ...