massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / timeit.pyi
1 from typing import IO, Any, Callable, Sequence, Union
2
3 _Timer = Callable[[], float]
4 _Stmt = Union[str, Callable[[], Any]]
5
6 default_timer: _Timer
7
8 class Timer:
9     def __init__(
10         self, stmt: _Stmt = ..., setup: _Stmt = ..., timer: _Timer = ..., globals: dict[str, Any] | None = ...
11     ) -> None: ...
12     def print_exc(self, file: IO[str] | None = ...) -> None: ...
13     def timeit(self, number: int = ...) -> float: ...
14     def repeat(self, repeat: int = ..., number: int = ...) -> list[float]: ...
15     def autorange(self, callback: Callable[[int, float], Any] | None = ...) -> tuple[int, float]: ...
16
17 def timeit(
18     stmt: _Stmt = ..., setup: _Stmt = ..., timer: _Timer = ..., number: int = ..., globals: dict[str, Any] | None = ...
19 ) -> float: ...
20 def repeat(
21     stmt: _Stmt = ...,
22     setup: _Stmt = ...,
23     timer: _Timer = ...,
24     repeat: int = ...,
25     number: int = ...,
26     globals: dict[str, Any] | None = ...,
27 ) -> list[float]: ...
28
29 _timerFunc = Callable[[], float]
30
31 def main(args: Sequence[str] | None = ..., *, _wrap_timer: Callable[[_timerFunc], _timerFunc] | None = ...) -> None: ...