From b71ccbb136671307c1d94bdda00b4543f67926d2 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 12 Mar 2019 16:37:10 +0000 Subject: [PATCH] Add timeit.main (#2731) This function is exposed to external users of timeit, and can come in useful if you merely want to provide defaults to timeit.main (albeit awkwardly). --- stdlib/2and3/timeit.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/2and3/timeit.pyi b/stdlib/2and3/timeit.pyi index 23a2b10e0..ea8e1ac01 100644 --- a/stdlib/2and3/timeit.pyi +++ b/stdlib/2and3/timeit.pyi @@ -1,7 +1,7 @@ # Stubs for timeit (Python 2 and 3) import sys -from typing import Any, Callable, Dict, IO, List, Optional, Text, Tuple, Union +from typing import Any, Callable, Dict, IO, List, Optional, Sequence, Text, Tuple, Union _str = Union[str, Text] _Timer = Callable[[], float] @@ -31,3 +31,4 @@ else: number: int = ...) -> float: ... def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ..., repeat: int = ..., number: int = ...) -> List[float]: ... +def main(args: Optional[Sequence[str]]) -> None: ...