X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fcoc-python-data%2FlanguageServer.0.5.59%2FTypeshed%2Fstdlib%2F2and3%2Fthreading.pyi;fp=.config%2Fcoc%2Fextensions%2Fcoc-python-data%2FlanguageServer.0.5.59%2FTypeshed%2Fstdlib%2F2and3%2Fthreading.pyi;h=c577cfb5efd5a26a531e606fa810374fb87fe306;hp=0000000000000000000000000000000000000000;hb=3be0a9efc698a9570a44456009afc6014812625a;hpb=d2f432cc757f42f0318fdddcab8c00b240d47088 diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/threading.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/threading.pyi new file mode 100644 index 00000000..c577cfb5 --- /dev/null +++ b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/threading.pyi @@ -0,0 +1,189 @@ +# Stubs for threading + +from typing import ( + Any, Callable, Iterable, List, Mapping, Optional, Tuple, Type, Union, + TypeVar, +) +from types import FrameType, TracebackType +import sys + +# TODO recursive type +_TF = Callable[[FrameType, str, Any], Optional[Callable[..., Any]]] + +_PF = Callable[[FrameType, str, Any], None] +_T = TypeVar('_T') + + +def active_count() -> int: ... +if sys.version_info < (3,): + def activeCount() -> int: ... + +def current_thread() -> Thread: ... +if sys.version_info < (3,): + def currentThread() -> Thread: ... + +if sys.version_info >= (3,): + def get_ident() -> int: ... + +def enumerate() -> List[Thread]: ... + +if sys.version_info >= (3, 4): + def main_thread() -> Thread: ... + +def settrace(func: _TF) -> None: ... +def setprofile(func: _PF) -> None: ... +def stack_size(size: int = ...) -> int: ... + +if sys.version_info >= (3,): + TIMEOUT_MAX = ... # type: float + +class ThreadError(Exception): ... + + +class local(object): + def __getattribute__(self, name: str) -> Any: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __delattr__(self, name: str) -> None: ... + + +class Thread: + name = ... # type: str + ident = ... # type: Optional[int] + daemon = ... # type: bool + if sys.version_info >= (3,): + def __init__(self, group: None = ..., + target: Optional[Callable[..., Any]] = ..., + name: Optional[str] = ..., + args: Iterable = ..., + kwargs: Mapping[str, Any] = ..., + *, daemon: Optional[bool] = ...) -> None: ... + else: + def __init__(self, group: None = ..., + target: Optional[Callable[..., Any]] = ..., + name: Optional[str] = ..., + args: Iterable = ..., + kwargs: Mapping[str, Any] = ...) -> None: ... + def start(self) -> None: ... + def run(self) -> None: ... + def join(self, timeout: Optional[float] = ...) -> None: ... + def getName(self) -> str: ... + def setName(self, name: str) -> None: ... + def is_alive(self) -> bool: ... + if sys.version_info < (3,): + def isAlive(self) -> bool: ... + def isDaemon(self) -> bool: ... + def setDaemon(self, daemonic: bool) -> None: ... + + +class _DummyThread(Thread): ... + + +class Lock: + def __init__(self) -> None: ... + def __enter__(self) -> bool: ... + def __exit__(self, exc_type: Optional[Type[BaseException]], + exc_val: Optional[Exception], + exc_tb: Optional[TracebackType]) -> bool: ... + if sys.version_info >= (3,): + def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... + else: + def acquire(self, blocking: bool = ...) -> bool: ... + def release(self) -> None: ... + def locked(self) -> bool: ... + + +class _RLock: + def __init__(self) -> None: ... + def __enter__(self) -> bool: ... + def __exit__(self, exc_type: Optional[Type[BaseException]], + exc_val: Optional[Exception], + exc_tb: Optional[TracebackType]) -> bool: ... + if sys.version_info >= (3,): + def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... + else: + def acquire(self, blocking: bool = ...) -> bool: ... + def release(self) -> None: ... + + +RLock = _RLock + + +class Condition: + def __init__(self, lock: Union[Lock, _RLock, None] = ...) -> None: ... + def __enter__(self) -> bool: ... + def __exit__(self, exc_type: Optional[Type[BaseException]], + exc_val: Optional[Exception], + exc_tb: Optional[TracebackType]) -> bool: ... + if sys.version_info >= (3,): + def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... + else: + def acquire(self, blocking: bool = ...) -> bool: ... + def release(self) -> None: ... + def wait(self, timeout: Optional[float] = ...) -> bool: ... + if sys.version_info >= (3,): + def wait_for(self, predicate: Callable[[], _T], + timeout: Optional[float] = ...) -> _T: ... + def notify(self, n: int = ...) -> None: ... + def notify_all(self) -> None: ... + def notifyAll(self) -> None: ... + + +class Semaphore: + def __init__(self, value: int = ...) -> None: ... + def __enter__(self) -> bool: ... + def __exit__(self, exc_type: Optional[Type[BaseException]], + exc_val: Optional[Exception], + exc_tb: Optional[TracebackType]) -> bool: ... + if sys.version_info >= (3,): + def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... + else: + def acquire(self, blocking: bool = ...) -> bool: ... + def release(self) -> None: ... + +class BoundedSemaphore: + def __init__(self, value: int = ...) -> None: ... + def __enter__(self) -> bool: ... + def __exit__(self, exc_type: Optional[Type[BaseException]], + exc_val: Optional[Exception], + exc_tb: Optional[TracebackType]) -> bool: ... + if sys.version_info >= (3,): + def acquire(self, blocking: bool = ..., timeout: float = ...) -> bool: ... + else: + def acquire(self, blocking: bool = ...) -> bool: ... + def release(self) -> None: ... + + +class Event: + def __init__(self) -> None: ... + def is_set(self) -> bool: ... + if sys.version_info < (3,): + def isSet(self) -> bool: ... + def set(self) -> None: ... + def clear(self) -> None: ... + def wait(self, timeout: Optional[float] = ...) -> bool: ... + + +class Timer(Thread): + if sys.version_info >= (3,): + def __init__(self, interval: float, function: Callable[..., None], + args: Optional[List[Any]] = ..., + kwargs: Optional[Mapping[str, Any]] = ...) -> None: ... + else: + def __init__(self, interval: float, function: Callable[..., None], + args: List[Any] = ..., + kwargs: Mapping[str, Any] = ...) -> None: ... + def cancel(self) -> None: ... + + +if sys.version_info >= (3,): + class Barrier: + parties = ... # type: int + n_waiting = ... # type: int + broken = ... # type: bool + def __init__(self, parties: int, action: Optional[Callable[[], None]] = ..., + timeout: Optional[float] = ...) -> None: ... + def wait(self, timeout: Optional[float] = ...) -> int: ... + def reset(self) -> None: ... + def abort(self) -> None: ... + + class BrokenBarrierError(RuntimeError): ...