Files
@ 4ce991cdacdb
Branch filter:
Location: light9/stubs/twisted/internet/defer.pyi
4ce991cdacdb
4.0 KiB
text/plain
more stubs
Ignore-this: adf95b608f6791c2d7128c0f8cf661f8
Ignore-this: adf95b608f6791c2d7128c0f8cf661f8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | # Stubs for twisted.internet.defer (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from twisted.python import lockfile
from typing import Any, Callable, Generic, Optional, TypeVar
class AlreadyCalledError(Exception): ...
class CancelledError(Exception): ...
class TimeoutError(Exception): ...
def succeed(result: Any): ...
def fail(result: Optional[Any] = ...): ...
def maybeDeferred(f: Any, *args: Any, **kw: Any): ...
T = TypeVar('T')
class Deferred(Generic[T]):
called: bool = ...
paused: bool = ...
debug: bool = ...
callbacks: Any = ...
def __init__(self, canceller: Optional[Any] = ...) -> None: ...
def addCallbacks(self,
callback: Callable[[T], Any],
errback: Optional[Any] = ...,
callbackArgs: Optional[Any] = ...,
callbackKeywords: Optional[Any] = ...,
errbackArgs: Optional[Any] = ...,
errbackKeywords: Optional[Any] = ...): ...
def addCallback(self, callback: Callable[[T], Any], *args: Any, **kw: Any): ...
def addErrback(self, errback: Any, *args: Any, **kw: Any): ...
def addBoth(self, callback: Callable[[T], Any], *args: Any, **kw: Any): ...
def addTimeout(self, timeout: Any, clock: Any, onTimeoutCancel: Optional[Any] = ...): ...
def chainDeferred(self, d: Any): ...
def callback(self, result: T) -> None: ...
def errback(self, fail: Optional[Any] = ...) -> None: ...
def pause(self) -> None: ...
def unpause(self) -> None: ...
def cancel(self) -> None: ...
def __iter__(self): ...
def send(self, value: Optional[Any] = ...): ...
__await__: Any = ...
__next__: Any = ...
def asFuture(self, loop: Any): ...
@classmethod
def fromFuture(cls, future: Any): ...
def ensureDeferred(coro: Any): ...
class DebugInfo:
failResult: Any = ...
def __del__(self) -> None: ...
class FirstError(Exception):
subFailure: Any = ...
index: Any = ...
def __init__(self, failure: Any, index: Any) -> None: ...
def __cmp__(self, other: Any): ...
class DeferredList(Deferred):
fireOnOneCallback: bool = ...
fireOnOneErrback: bool = ...
resultList: Any = ...
consumeErrors: Any = ...
finishedCount: int = ...
def __init__(self, deferredList: Any, fireOnOneCallback: bool = ..., fireOnOneErrback: bool = ..., consumeErrors: bool = ...) -> None: ...
def cancel(self) -> None: ...
def gatherResults(deferredList: Any, consumeErrors: bool = ...): ...
SUCCESS: bool
FAILURE: bool
class waitForDeferred:
d: Any = ...
def __init__(self, d: Any) -> None: ...
def getResult(self): ...
def deferredGenerator(f: Any): ...
class _DefGen_Return(BaseException):
value: Any = ...
def __init__(self, value: Any) -> None: ...
def returnValue(val: Any) -> None: ...
class _InternalInlineCallbacksCancelledError(Exception): ...
def inlineCallbacks(f: Any): ...
class _ConcurrencyPrimitive:
waiting: Any = ...
def __init__(self) -> None: ...
def run(*args: Any, **kwargs: Any): ...
class DeferredLock(_ConcurrencyPrimitive):
locked: bool = ...
def acquire(self): ...
def release(self) -> None: ...
class DeferredSemaphore(_ConcurrencyPrimitive):
tokens: Any = ...
limit: Any = ...
def __init__(self, tokens: Any) -> None: ...
def acquire(self): ...
def release(self) -> None: ...
class QueueOverflow(Exception): ...
class QueueUnderflow(Exception): ...
class DeferredQueue:
waiting: Any = ...
pending: Any = ...
size: Any = ...
backlog: Any = ...
def __init__(self, size: Optional[Any] = ..., backlog: Optional[Any] = ...) -> None: ...
def put(self, obj: Any) -> None: ...
def get(self): ...
class AlreadyTryingToLockError(Exception): ...
class DeferredFilesystemLock(lockfile.FilesystemLock):
def __init__(self, name: Any, scheduler: Optional[Any] = ...) -> None: ...
def deferUntilLocked(self, timeout: Optional[Any] = ...): ...
def setDebugging(yes: bool) -> None: ...
|