HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/vine/__pycache__/abstract.cpython-310.pyc
o

weT�@sLdZddlZddlmZdgZGdd�deejd�ZejGdd�d��ZdS)	zAbstract classes.�N)�Callable�Thenablec@sZeZdZdZdZejddd��Zejddd��Zejd	d
��Z	e
dd��Ze
d
d��ZdS)rz!Object that supports ``.then()``.�NcC�t���N��NotImplementedError��self�
on_success�on_errorrr�F/home/arjun/projects/env/lib/python3.10/site-packages/vine/abstract.py�then
�z
Thenable.thenTcCrrr�r
�exc�tb�	propagaterrr
�throwrzThenable.throwcCrrr�r
rrr
�cancelrzThenable.cancelcCs$|turtdd�|jD��rdStS)Ncss�|]}d|jvVqdS)rN)�__dict__)�.0�Brrr
�	<genexpr>s�z,Thenable.__subclasshook__.<locals>.<genexpr>T)r�any�__mro__�NotImplemented)�cls�Crrr
�__subclasshook__szThenable.__subclasshook__cCst|��||�|Sr)�type�register)r�otherrrr
r" szThenable.registerr�NNT)
�__name__�
__module__�__qualname__�__doc__�	__slots__�abc�abstractmethodrrr�classmethodr r"rrrr
rs

)�	metaclassc@sbeZdZdZdd�Zddd�Zdd�Zdd	d
�Zddd
�Ze	dd��Z
e	dd��Ze	dd��ZdS)�
ThenableProxyz*Proxy to object that supports ``.then()``.cCs
||_dSr)�_p)r
�prrr
�_set_promise_target+�
z!ThenableProxy._set_promise_targetNcCs|j�||�Sr)r/rr	rrr
r.szThenableProxy.thencCs
|j��Sr)r/rrrrr
r1r2zThenableProxy.cancelcCs|j�|�Sr)r/�throw1)r
rrrr
r34szThenableProxy.throw1TcCs|jj|||d�S)N)rr)r/rrrrr
r7szThenableProxy.throwcC�|jjSr)r/�	cancelledrrrr
r5:�zThenableProxy.cancelledcCr4r)r/�readyrrrr
r7>r6zThenableProxy.readycCr4r)r/�failedrrrr
r8Br6zThenableProxy.failedrr$)
r%r&r'r(r1rrr3r�propertyr5r7r8rrrr
r.'s




r.)	r(r*�collections.abcr�__all__�ABCMetarr"r.rrrr
�<module>s