o
    ôj„  ã                   @  sd   d dl mZ d dlmZ G dd„ deƒZG dd„ deƒZG dd„ deƒZ	G d	d
„ d
e
ƒZg d¢ZdS )é    )Úannotations)ÚFinalc                      sP   e Zd ZdZdd‡ fd	d
„Zddd„Zddd„Zddd„Zeddd„ƒZ	‡  Z
S )ÚTimeoutz@Raised when the lock could not be acquired in *timeout* seconds.NÚ	lock_fileÚstrÚholderú
str | NoneÚreturnÚNonec                   s   t ƒ  ¡  || _|| _d S ©N)ÚsuperÚ__init__Ú
_lock_fileÚ_holder)Úselfr   r   ©Ú	__class__© ú`/var/www/html/academy/tools/voices/clone/sv-venv/lib/python3.10/site-packages/filelock/_error.pyr   	   s   

zTimeout.__init__ú3tuple[type[Timeout], tuple[str], dict[str, object]]c                 C  s   | j | jf| jfS r   )r   r   Ú__dict__©r   r   r   r   Ú
__reduce__   s   zTimeout.__reduce__c                 C  s.   d| j › d�}| jd u r|S |› d| j› d�S )NzThe file lock 'z' could not be acquired.z It is held by z, which this host cannot probe.)r   r   )r   Úmessager   r   r   Ú__str__   s   
zTimeout.__str__c                 C  s   | j j› d| j›d�S )Nú(ú))r   Ú__name__r   r   r   r   r   Ú__repr__   s   zTimeout.__repr__c                 C  ó   | j S )zThe path of the file lock.©r   r   r   r   r   r      ó   zTimeout.lock_filer   )r   r   r   r   r	   r
   )r	   r   ©r	   r   )r   Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úpropertyr   Ú__classcell__r   r   r   r   r      s    


r   c                   @  ó   e Zd ZdZdS )ÚSoftFileLockLifetimeWarningzé
    The configured soft-lock lifetime permits overlapping live holders after expiry.

    A :class:`FutureWarning` shows by default wherever the lock is configured; a :class:`DeprecationWarning` shows only
    in ``__main__``.

    N©r   r#   r$   r%   r   r   r   r   r)   !   ó    r)   c                   @  r(   )ÚLeaseSettingsMismatchzTA lease contender disagrees with the published claim about how long the lease lasts.Nr*   r   r   r   r   r,   +   r+   r,   c                      s`   e Zd ZdZd‡ fd	d
„Zddd„Zddd„Zeddd„ƒZeddd„ƒZ	eddd„ƒZ
‡  ZS )ÚSoftFileLockProtocolErrorzQRaised when strict soft-lock state cannot be interpreted without risking overlap.r   r   Ú
claim_namer   Úreasonr	   r
   c                   s&   || _ || _|| _tƒ  |  ¡ ¡ d S r   )r   Ú_claim_nameÚ_reasonr   r   r   )r   r   r.   r/   r   r   r   r   2   s   z"SoftFileLockProtocolError.__init__úVtuple[type[SoftFileLockProtocolError], tuple[str, str | None, str], dict[str, object]]c                 C  s   | j | j| j| jf| jfS r   )r   r   r0   r1   r   r   r   r   r   r   8   s   z$SoftFileLockProtocolError.__reduce__c                 C  s4   | j d u r| jn| j› d| j ›�}d|› d| j› �S )Nz: claim z"Invalid strict soft-lock state at z: )r0   r   r1   )r   Úlocationr   r   r   r   ?   s   "z!SoftFileLockProtocolError.__str__c                 C  r   )zThe requested lock path.r    r   r   r   r   r   C   r!   z#SoftFileLockProtocolError.lock_filec                 C  r   )z<The claim that caused the error, if scanning identified one.)r0   r   r   r   r   r.   H   r!   z$SoftFileLockProtocolError.claim_namec                 C  r   )z The protocol validation failure.)r1   r   r   r   r   r/   M   r!   z SoftFileLockProtocolError.reason)r   r   r.   r   r/   r   r	   r
   )r	   r2   r"   )r	   r   )r   r#   r$   r%   r   r   r   r&   r   r.   r/   r'   r   r   r   r   r-   /   s    

r-   )r,   r)   r-   r   N)Ú
__future__r   Útypingr   ÚTimeoutErrorr   ÚFutureWarningr)   Ú
ValueErrorr,   ÚOSErrorr-   Ú__all__r   r   r   r   Ú<module>   s    
$