diff stubs/twisted/internet/task.pyi @ 53:a21b87140758

more stubs Ignore-this: ff80b18a86305d43128277f5db0248b5
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 30 May 2019 08:15:10 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/twisted/internet/task.pyi	Thu May 30 08:15:10 2019 +0000
@@ -0,0 +1,69 @@
+# Stubs for twisted.internet.task (Python 3)
+#
+
+from typing import Any, Optional
+
+__metaclass__ = type
+
+class LoopingCall:
+    call: Any = ...
+    running: bool = ...
+    interval: Any = ...
+    starttime: Any = ...
+    f: Any = ...
+    a: Any = ...
+    kw: Any = ...
+    clock: Any = ...
+    def __init__(self, f: Any, *a: Any, **kw: Any) -> None: ...
+    @property
+    def deferred(self): ...
+    withCount: Any = ...
+    def start(self, interval: Any, now: bool = ...): ...
+    def stop(self) -> None: ...
+    def reset(self) -> None: ...
+    def __call__(self) -> None: ...
+
+class SchedulerError(Exception): ...
+class SchedulerStopped(SchedulerError): ...
+class TaskFinished(SchedulerError): ...
+class TaskDone(TaskFinished): ...
+class TaskStopped(TaskFinished): ...
+class TaskFailed(TaskFinished): ...
+class NotPaused(SchedulerError): ...
+
+class _Timer:
+    MAX_SLICE: float = ...
+    end: Any = ...
+    def __init__(self) -> None: ...
+    def __call__(self): ...
+
+class CooperativeTask:
+    def __init__(self, iterator: Any, cooperator: Any) -> None: ...
+    def whenDone(self): ...
+    def pause(self) -> None: ...
+    def resume(self) -> None: ...
+    def stop(self) -> None: ...
+
+class Cooperator:
+    def __init__(self, terminationPredicateFactory: Any = ..., scheduler: Any = ..., started: bool = ...) -> None: ...
+    def coiterate(self, iterator: Any, doneDeferred: Optional[Any] = ...): ...
+    def cooperate(self, iterator: Any): ...
+    def start(self) -> None: ...
+    def stop(self) -> None: ...
+    @property
+    def running(self): ...
+
+def coiterate(iterator: Any): ...
+
+class Clock:
+    rightNow: float = ...
+    calls: Any = ...
+    def __init__(self) -> None: ...
+    def seconds(self): ...
+    def callLater(self, when: Any, what: Any, *a: Any, **kw: Any): ...
+    def getDelayedCalls(self): ...
+    def advance(self, amount: Any) -> None: ...
+    def pump(self, timings: Any) -> None: ...
+
+def deferLater(clock: Any, delay: Any, callable: Any, *args: Any, **kw: Any): ...
+def react(main: Any, argv: Any = ..., _reactor: Optional[Any] = ...) -> None: ...