mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
stdlib: audit more callback annotations (#8209)
This commit is contained in:
@@ -5,7 +5,7 @@ from typing_extensions import TypeAlias
|
||||
__all__ = ["Timer", "timeit", "repeat", "default_timer"]
|
||||
|
||||
_Timer: TypeAlias = Callable[[], float]
|
||||
_Stmt: TypeAlias = str | Callable[[], Any]
|
||||
_Stmt: TypeAlias = str | Callable[[], object]
|
||||
|
||||
default_timer: _Timer
|
||||
|
||||
@@ -16,7 +16,7 @@ class Timer:
|
||||
def print_exc(self, file: IO[str] | None = ...) -> None: ...
|
||||
def timeit(self, number: int = ...) -> float: ...
|
||||
def repeat(self, repeat: int = ..., number: int = ...) -> list[float]: ...
|
||||
def autorange(self, callback: Callable[[int, float], Any] | None = ...) -> tuple[int, float]: ...
|
||||
def autorange(self, callback: Callable[[int, float], object] | None = ...) -> tuple[int, float]: ...
|
||||
|
||||
def timeit(
|
||||
stmt: _Stmt = ..., setup: _Stmt = ..., timer: _Timer = ..., number: int = ..., globals: dict[str, Any] | None = ...
|
||||
|
||||
Reference in New Issue
Block a user