File: //lib/python3.10/asyncio/__pycache__/exceptions.cpython-310.pyc
o
    E�ha  �                   @   sl   d Z dZG dd� de�ZG dd� de�ZG dd� de�ZG dd	� d	e�ZG d
d� de	�Z
G dd
� d
e�ZdS )zasyncio exceptions.)�CancelledError�InvalidStateError�TimeoutError�IncompleteReadError�LimitOverrunError�SendfileNotAvailableErrorc                   @   �   e Zd ZdZdS )r   z!The Future or Task was cancelled.N��__name__�
__module__�__qualname__�__doc__� r
   r
   �)/usr/lib/python3.10/asyncio/exceptions.pyr   	   �    r   c                   @   r   )r   z*The operation exceeded the given deadline.Nr   r
   r
   r
   r   r   
   r   r   c                   @   r   )r   z+The operation is not allowed in this state.Nr   r
   r
   r
   r   r      r   r   c                   @   r   )r   z~Sendfile syscall is not available.
    Raised if OS does not support sendfile syscall for given socket or
    file type.
    Nr   r
   r
   r
   r   r      r   r   c                       �(   e Zd ZdZ� fdd�Zdd� Z�  ZS )r   z�
    Incomplete read error. Attributes:
    - partial: read bytes string before the end of stream was reached
    - expected: total number of expected bytes (or None if unknown)
    c                    s@   |d u rdnt |�}t� �t|�� d|� d�� || _|| _d S )N�	undefinedz bytes read on a total of z expected bytes)�repr�super�__init__�len�partial�expected)�selfr   r   �
r_expected��	__class__r
   r   r   $   s   
�
zIncompleteReadError.__init__c                 C   s   t | �| j| jffS �N)�typer   r   �r   r
   r
   r   �
__reduce__+   s   zIncompleteReadError.__reduce__�r	   r
   r   r   r   r   �
__classcell__r
   r
   r   r   r      s    r   c                       r   )r   z�Reached the buffer limit while looking for a separator.
    Attributes:
    - consumed: total number of to be consumed bytes.
    c                    s   t � �|� || _d S r   )r   r   �consumed)r   �messager"