massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / pstats.pyi
1 import sys
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
6
7 _Selector = Union[str, float, int]
8 _T = TypeVar("_T", bound=Stats)
9
10 if sys.version_info >= (3, 7):
11     from enum import Enum
12     class SortKey(str, Enum):
13         CALLS: str
14         CUMULATIVE: str
15         FILENAME: str
16         LINE: str
17         NAME: str
18         NFL: str
19         PCALLS: str
20         STDNAME: str
21         TIME: str
22
23 class Stats:
24     sort_arg_dict_default: dict[str, tuple[Any, str]]
25     def __init__(
26         self: _T,
27         __arg: None | str | Profile | _cProfile = ...,
28         *args: None | str | Profile | _cProfile | _T,
29         stream: IO[Any] | None = ...,
30     ) -> 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]]: ...
37     @overload
38     def sort_stats(self: _T, field: int) -> _T: ...
39     @overload
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: ...