mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
concurrent.futures: stubgen
Imports had to be fixed up manually.
This commit is contained in:
0
stdlib/3/concurrent/__init__.pyi
Normal file
0
stdlib/3/concurrent/__init__.pyi
Normal file
7
stdlib/3/concurrent/futures/__init__.pyi
Normal file
7
stdlib/3/concurrent/futures/__init__.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
# Stubs for concurrent.futures (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from ._base import *
|
||||
from .thread import *
|
||||
from .process import *
|
||||
81
stdlib/3/concurrent/futures/_base.pyi
Normal file
81
stdlib/3/concurrent/futures/_base.pyi
Normal file
@@ -0,0 +1,81 @@
|
||||
# Stubs for concurrent.futures._base (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from collections import namedtuple
|
||||
|
||||
FIRST_COMPLETED = ... # type: Any
|
||||
FIRST_EXCEPTION = ... # type: Any
|
||||
ALL_COMPLETED = ... # type: Any
|
||||
PENDING = ... # type: Any
|
||||
RUNNING = ... # type: Any
|
||||
CANCELLED = ... # type: Any
|
||||
CANCELLED_AND_NOTIFIED = ... # type: Any
|
||||
FINISHED = ... # type: Any
|
||||
LOGGER = ... # type: Any
|
||||
|
||||
class Error(Exception): ...
|
||||
class CancelledError(Error): ...
|
||||
class TimeoutError(Error): ...
|
||||
|
||||
class _Waiter:
|
||||
event = ... # type: Any
|
||||
finished_futures = ... # type: Any
|
||||
def __init__(self): ...
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _AsCompletedWaiter(_Waiter):
|
||||
lock = ... # type: Any
|
||||
def __init__(self): ...
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _FirstCompletedWaiter(_Waiter):
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _AllCompletedWaiter(_Waiter):
|
||||
num_pending_calls = ... # type: Any
|
||||
stop_on_exception = ... # type: Any
|
||||
lock = ... # type: Any
|
||||
def __init__(self, num_pending_calls, stop_on_exception): ...
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _AcquireFutures:
|
||||
futures = ... # type: Any
|
||||
def __init__(self, futures): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args): ...
|
||||
|
||||
def as_completed(fs, timeout=None): ...
|
||||
|
||||
DoneAndNotDoneFutures = namedtuple('DoneAndNotDoneFutures', 'done not_done')
|
||||
|
||||
def wait(fs, timeout=None, return_when=...): ...
|
||||
|
||||
class Future:
|
||||
def __init__(self): ...
|
||||
def cancel(self): ...
|
||||
def cancelled(self): ...
|
||||
def running(self): ...
|
||||
def done(self): ...
|
||||
def add_done_callback(self, fn): ...
|
||||
def result(self, timeout=None): ...
|
||||
def exception(self, timeout=None): ...
|
||||
def set_running_or_notify_cancel(self): ...
|
||||
def set_result(self, result): ...
|
||||
def set_exception(self, exception): ...
|
||||
|
||||
class Executor:
|
||||
def submit(self, fn, *args, **kwargs): ...
|
||||
def map(self, fn, *iterables, *, timeout=None, chunksize=1): ...
|
||||
def shutdown(self, wait=True): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb): ...
|
||||
46
stdlib/3/concurrent/futures/process.pyi
Normal file
46
stdlib/3/concurrent/futures/process.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
# Stubs for concurrent.futures.process (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from . import _base
|
||||
|
||||
EXTRA_QUEUED_CALLS = ... # type: Any
|
||||
|
||||
class _RemoteTraceback(Exception):
|
||||
tb = ... # type: Any
|
||||
def __init__(self, tb): ...
|
||||
|
||||
class _ExceptionWithTraceback:
|
||||
exc = ... # type: Any
|
||||
tb = ... # type: Any
|
||||
def __init__(self, exc, tb): ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class _WorkItem:
|
||||
future = ... # type: Any
|
||||
fn = ... # type: Any
|
||||
args = ... # type: Any
|
||||
kwargs = ... # type: Any
|
||||
def __init__(self, future, fn, args, kwargs): ...
|
||||
|
||||
class _ResultItem:
|
||||
work_id = ... # type: Any
|
||||
exception = ... # type: Any
|
||||
result = ... # type: Any
|
||||
def __init__(self, work_id, exception=None, result=None): ...
|
||||
|
||||
class _CallItem:
|
||||
work_id = ... # type: Any
|
||||
fn = ... # type: Any
|
||||
args = ... # type: Any
|
||||
kwargs = ... # type: Any
|
||||
def __init__(self, work_id, fn, args, kwargs): ...
|
||||
|
||||
class BrokenProcessPool(RuntimeError): ...
|
||||
|
||||
class ProcessPoolExecutor(_base.Executor):
|
||||
def __init__(self, max_workers=None): ...
|
||||
def submit(self, fn, *args, **kwargs): ...
|
||||
def map(self, fn, *iterables, *, timeout=None, chunksize=1): ...
|
||||
def shutdown(self, wait=True): ...
|
||||
19
stdlib/3/concurrent/futures/thread.pyi
Normal file
19
stdlib/3/concurrent/futures/thread.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
# Stubs for concurrent.futures.thread (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from . import _base
|
||||
|
||||
class _WorkItem:
|
||||
future = ... # type: Any
|
||||
fn = ... # type: Any
|
||||
args = ... # type: Any
|
||||
kwargs = ... # type: Any
|
||||
def __init__(self, future, fn, args, kwargs): ...
|
||||
def run(self): ...
|
||||
|
||||
class ThreadPoolExecutor(_base.Executor):
|
||||
def __init__(self, max_workers=None): ...
|
||||
def submit(self, fn, *args, **kwargs): ...
|
||||
def shutdown(self, wait=True): ...
|
||||
Reference in New Issue
Block a user