massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / trace.pyi
1 # Stubs for trace (Python 2 and 3)\r
2 \r
3 import os\r
4 import sys\r
5 import types\r
6 from typing import Any, Callable, Mapping, Optional, Sequence, Text, Tuple, TypeVar, Union\r
7 \r
8 _T = TypeVar('_T')\r
9 _localtrace = Callable[[types.FrameType, str, Any], Callable[..., Any]]\r
10 \r
11 if sys.version_info >= (3, 6):\r
12     _Path = Union[Text, os.PathLike]\r
13 else:\r
14     _Path = Text\r
15 \r
16 class CoverageResults:\r
17     def update(self, other: CoverageResults) -> None: ...\r
18     def write_results(self, show_missing: bool = ..., summary: bool = ..., coverdir: Optional[_Path] = ...) -> None: ...\r
19     def write_results_file(self, path: _Path, lines: Sequence[str], lnotab: Any, lines_hit: Mapping[int, int], encoding: Optional[str] = ...) -> Tuple[int, int]: ...\r
20 \r
21 class Trace:\r
22     def __init__(self, count: int = ..., trace: int = ..., countfuncs: int = ..., countcallers: int = ...,\r
23                  ignoremods: Sequence[str] = ..., ignoredirs: Sequence[str] = ..., infile: Optional[_Path] = ...,\r
24                  outfile: Optional[_Path] = ..., timing: bool = ...) -> None: ...\r
25     def run(self, cmd: Union[str, types.CodeType]) -> None: ...\r
26     def runctx(self, cmd: Union[str, types.CodeType], globals: Optional[Mapping[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> None: ...\r
27     def runfunc(self, func: Callable[..., _T], *args: Any, **kw: Any) -> _T: ...\r
28     def file_module_function_of(self, frame: types.FrameType) -> Tuple[str, Optional[str], str]: ...\r
29     def globaltrace_trackcallers(self, frame: types.FrameType, why: str, arg: Any) -> None: ...\r
30     def globaltrace_countfuncs(self, frame: types.FrameType, why: str, arg: Any) -> None: ...\r
31     def globaltrace_lt(self, frame: types.FrameType, why: str, arg: Any) -> None: ...\r
32     def localtrace_trace_and_count(self, frame: types.FrameType, why: str, arg: Any) -> _localtrace: ...\r
33     def localtrace_trace(self, frame: types.FrameType, why: str, arg: Any) -> _localtrace: ...\r
34     def localtrace_count(self, frame: types.FrameType, why: str, arg: Any) -> _localtrace: ...\r
35     def results(self) -> CoverageResults: ...\r