mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-13 20:00:52 +08:00
[stdlib] Add default values part 2 (#14769)
This commit is contained in:
+12
-3
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing import IO, Any
|
||||
from typing_extensions import TypeAlias
|
||||
@@ -11,7 +12,11 @@ default_timer: _Timer
|
||||
|
||||
class Timer:
|
||||
def __init__(
|
||||
self, stmt: _Stmt = "pass", setup: _Stmt = "pass", timer: _Timer = ..., globals: dict[str, Any] | None = None
|
||||
self,
|
||||
stmt: _Stmt = "pass",
|
||||
setup: _Stmt = "pass",
|
||||
timer: _Timer = time.perf_counter,
|
||||
globals: dict[str, Any] | None = None,
|
||||
) -> None: ...
|
||||
def print_exc(self, file: IO[str] | None = None) -> None: ...
|
||||
def timeit(self, number: int = 1000000) -> float: ...
|
||||
@@ -19,12 +24,16 @@ class Timer:
|
||||
def autorange(self, callback: Callable[[int, float], object] | None = None) -> tuple[int, float]: ...
|
||||
|
||||
def timeit(
|
||||
stmt: _Stmt = "pass", setup: _Stmt = "pass", timer: _Timer = ..., number: int = 1000000, globals: dict[str, Any] | None = None
|
||||
stmt: _Stmt = "pass",
|
||||
setup: _Stmt = "pass",
|
||||
timer: _Timer = time.perf_counter,
|
||||
number: int = 1000000,
|
||||
globals: dict[str, Any] | None = None,
|
||||
) -> float: ...
|
||||
def repeat(
|
||||
stmt: _Stmt = "pass",
|
||||
setup: _Stmt = "pass",
|
||||
timer: _Timer = ...,
|
||||
timer: _Timer = time.perf_counter,
|
||||
repeat: int = 5,
|
||||
number: int = 1000000,
|
||||
globals: dict[str, Any] | None = None,
|
||||
|
||||
Reference in New Issue
Block a user