
    \j	                    p    d dl mZ  G d de      Z G d de      Z G d de      Z G d d	e      Z	g d
Z
y)    )annotationsc                  N     e Zd ZdZd fdZddZd	dZd	dZed	d       Z	 xZ
S )
Timeoutz@Raised when the lock could not be acquired in *timeout* seconds.c                0    t         |           || _        y N)super__init__
_lock_file)self	lock_file	__class__s     B/root/.hermes/venv/lib/python3.12/site-packages/filelock/_error.pyr	   zTimeout.__init__   s    #    c                4    | j                   | j                  ffS r   )r   r
   r   s    r   
__reduce__zTimeout.__reduce__   s    ~~111r   c                "    d| j                    dS )NzThe file lock 'z' could not be acquired.r
   r   s    r   __str__zTimeout.__str__   s      11IJJr   c                N    | j                   j                   d| j                  dS )N())r   __name__r   r   s    r   __repr__zTimeout.__repr__   s%    ..))*!DNN+=Q??r   c                    | j                   S )zThe path of the file lock.r   r   s    r   r   zTimeout.lock_file        r   )r   strreturnNone)r   z tuple[type[Timeout], tuple[str]]r   r   )r   
__module____qualname____doc__r	   r   r   r   propertyr   __classcell__r   s   @r   r   r      s0    J$2K@  r   r   c                      e Zd ZdZy)SoftFileLockLifetimeWarningzPThe configured soft-lock lifetime permits overlapping live holders after expiry.Nr   r!   r"   r#    r   r   r(   r(      s    Zr   r(   c                      e Zd ZdZy)LeaseSettingsMismatchzTA lease contender disagrees with the published claim about how long the lease lasts.Nr)   r*   r   r   r,   r,      s    ^r   r,   c                  j     e Zd ZdZd fdZd	dZd
dZed
d       Zedd       Z	ed
d       Z
 xZS )SoftFileLockProtocolErrorzQRaised when strict soft-lock state cannot be interpreted without risking overlap.c                j    || _         || _        || _        t        |   | j                                y r   )r
   _claim_name_reasonr   r	   r   )r   r   
claim_namereasonr   s       r   r	   z"SoftFileLockProtocolError.__init__&   s,    #%(r   c                `    | j                   | j                  | j                  | j                  ffS r   )r   r
   r0   r1   r   s    r   r   z$SoftFileLockProtocolError.__reduce__,   s&    ~~1A1A4<<PPPr   c                    | j                   | j                  n| j                   d| j                   }d| d| j                   S )Nz: claim z"Invalid strict soft-lock state at z: )r0   r
   r1   )r   locations     r   r   z!SoftFileLockProtocolError.__str__/   sH    &*&6&6&>4??tFWW_`d`p`p_sDt3H:R~NNr   c                    | j                   S )zThe requested lock path.r   r   s    r   r   z#SoftFileLockProtocolError.lock_file3   r   r   c                    | j                   S )z<The claim that caused the error, if scanning identified one.)r0   r   s    r   r2   z$SoftFileLockProtocolError.claim_name8   s     r   c                    | j                   S )z The protocol validation failure.)r1   r   s    r   r3   z SoftFileLockProtocolError.reason=   s     ||r   )r   r   r2   
str | Noner3   r   r   r   )r   zCtuple[type[SoftFileLockProtocolError], tuple[str, str | None, str]]r    )r   r:   )r   r!   r"   r#   r	   r   r   r$   r   r2   r3   r%   r&   s   @r   r.   r.   #   sS    [)QO        r   r.   )r,   r(   r.   r   N)
__future__r   TimeoutErrorr   DeprecationWarningr(   
ValueErrorr,   OSErrorr.   __all__r*   r   r   <module>rA      sE    "l .["4 [_J _ @r   