Improve sched typings (#7138)

This commit is contained in:
Nikita Sobolev
2022-02-05 18:36:43 +03:00
committed by GitHub
parent 287c8c3d79
commit bdef0a70a6

View File

@@ -1,5 +1,7 @@
from typing import Any, Callable, NamedTuple
__all__ = ["scheduler"]
class Event(NamedTuple):
time: float
priority: Any
@@ -8,7 +10,10 @@ class Event(NamedTuple):
kwargs: dict[str, Any]
class scheduler:
def __init__(self, timefunc: Callable[[], float] = ..., delayfunc: Callable[[float], None] = ...) -> None: ...
timefunc: Callable[[], float]
delayfunc: Callable[[float], object]
def __init__(self, timefunc: Callable[[], float] = ..., delayfunc: Callable[[float], object] = ...) -> None: ...
def enterabs(
self,
time: float,