mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
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).
This commit is contained in:
committed by
Jelle Zijlstra
parent
6b6d8c82ac
commit
b71ccbb136
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user