Adjust return types of shed.scheduler.run. (#2050)

This commit is contained in:
Siva Chandra
2018-04-13 21:00:27 -07:00
committed by Jelle Zijlstra
parent d63866bd36
commit 035774e022

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Callable, Dict, List, NamedTuple, Text, Tuple
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Text, Tuple
Event = NamedTuple('Event', [
('time', float),
@@ -14,12 +14,12 @@ class scheduler:
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: ...
def run(self, blocking: bool = ...) -> Optional[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 run(self) -> None: ...
def cancel(self, event: Event) -> None: ...
def empty(self) -> bool: ...