mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Adjust return types of shed.scheduler.run. (#2050)
This commit is contained in:
committed by
Jelle Zijlstra
parent
d63866bd36
commit
035774e022
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user