mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix various py310 stubtest errors (#7239)
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
import sys
|
||||
from typing import Any, Callable, NamedTuple
|
||||
|
||||
__all__ = ["scheduler"]
|
||||
|
||||
class Event(NamedTuple):
|
||||
time: float
|
||||
priority: Any
|
||||
action: Callable[..., Any]
|
||||
argument: tuple[Any, ...]
|
||||
kwargs: dict[str, Any]
|
||||
if sys.version_info >= (3, 10):
|
||||
class Event(NamedTuple):
|
||||
time: float
|
||||
priority: Any
|
||||
sequence: int
|
||||
action: Callable[..., Any]
|
||||
argument: tuple[Any, ...]
|
||||
kwargs: dict[str, Any]
|
||||
|
||||
else:
|
||||
class Event(NamedTuple):
|
||||
time: float
|
||||
priority: Any
|
||||
action: Callable[..., Any]
|
||||
argument: tuple[Any, ...]
|
||||
kwargs: dict[str, Any]
|
||||
|
||||
class scheduler:
|
||||
timefunc: Callable[[], float]
|
||||
|
||||
Reference in New Issue
Block a user