Files
typeshed/stdlib/2and3/sched.pyi
Emily Morehouse b6d08b81a3 #1286 Remove header comments from stubs (#1292)
- Updates documentation related to previously required comment headers.
- Removes all comment headers from stubs
- Occasionally included a header for stubs that were noted to be incomplete or contained todo's.
2017-05-22 15:14:15 -07:00

28 lines
1.3 KiB
Python

import sys
from typing import Any, Callable, Dict, List, NamedTuple, Text, Tuple
Event = NamedTuple('Event', [
('time', float),
('priority', Any),
('action', Callable[..., Any]),
('argument', Tuple[Any, ...]),
('kwargs', Dict[Text, Any]),
])
class scheduler:
if sys.version_info >= (3, 3):
def __init__(self, timefunc: Callable[[], float] = ..., delayfunc: Callable[[float], None] = ...) -> None: ...
def enterabs(self, time: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...] = ..., kwargs: Dict[str, Any] = ...) -> Event: ...
def enter(self, delay: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...] = ..., kwargs: Dict[str, Any] = ...) -> Event: ...
def run(self, blocking: bool = ...) -> float: ...
else:
def __init__(self, timefunc: Callable[[], float], delayfunc: Callable[[float], None]) -> None: ...
def enterabs(self, time: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...]) -> Event: ...
def enter(self, delay: float, priority: Any, action: Callable[..., Any], argument: Tuple[Any, ...]) -> Event: ...
def run(self) -> float: ...
def cancel(self, event: Event) -> None: ...
def empty(self) -> bool: ...
@property
def queue(self) -> List[Event]: ...