massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / cProfile.pyi
1 import sys
2 from _typeshed import Self, StrOrBytesPath
3 from types import CodeType
4 from typing import Any, Callable, Tuple, TypeVar
5
6 def run(statement: str, filename: str | None = ..., sort: str | int = ...) -> None: ...
7 def runctx(
8     statement: str, globals: dict[str, Any], locals: dict[str, Any], filename: str | None = ..., sort: str | int = ...
9 ) -> None: ...
10
11 _T = TypeVar("_T")
12 _Label = Tuple[str, int, str]
13
14 class Profile:
15     stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]]  # undocumented
16     def __init__(
17         self, timer: Callable[[], float] = ..., timeunit: float = ..., subcalls: bool = ..., builtins: bool = ...
18     ) -> None: ...
19     def enable(self) -> None: ...
20     def disable(self) -> None: ...
21     def print_stats(self, sort: str | int = ...) -> None: ...
22     def dump_stats(self, file: StrOrBytesPath) -> None: ...
23     def create_stats(self) -> None: ...
24     def snapshot_stats(self) -> None: ...
25     def run(self: Self, cmd: str) -> Self: ...
26     def runctx(self: Self, cmd: str, globals: dict[str, Any], locals: dict[str, Any]) -> Self: ...
27     def runcall(self, __func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ...
28     if sys.version_info >= (3, 8):
29         def __enter__(self: Self) -> Self: ...
30         def __exit__(self, *exc_info: Any) -> None: ...
31
32 def label(code: str | CodeType) -> _Label: ...  # undocumented