mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Split stdlib into Python 2 and 3 versions (#5442)
All new files in stdlib/@python2 are straight copies of the corresponding files in stdlib.
This commit is contained in:
39
stdlib/@python2/sched.pyi
Normal file
39
stdlib/@python2/sched.pyi
Normal file
@@ -0,0 +1,39 @@
|
||||
import sys
|
||||
from typing import Any, Callable, Dict, List, NamedTuple, Optional, Text, Tuple
|
||||
|
||||
class Event(NamedTuple):
|
||||
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 = ...) -> 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) -> None: ...
|
||||
def cancel(self, event: Event) -> None: ...
|
||||
def empty(self) -> bool: ...
|
||||
@property
|
||||
def queue(self) -> List[Event]: ...
|
||||
Reference in New Issue
Block a user