stdlib: audit more callback annotations (#8209)

This commit is contained in:
Alex Waygood
2022-07-19 15:07:25 +01:00
committed by GitHub
parent 540a6b25bf
commit e2ce7c6344
21 changed files with 61 additions and 64 deletions

View File

@@ -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 = ...