
    h
                         d dl mZmZ g dZ G d de          Z G d de          Z G d de          Z G d	 d
e          Z G d de          Z	dS )    )ListAny)Pysubs2ErrorUnknownFPSErrorUnknownFileExtensionErrorUnknownFormatIdentifierErrorFormatAutodetectionErrorc                       e Zd ZdZdS )r   z"Base class for pysubs2 exceptions.N__name__
__module____qualname____doc__     R/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/pysubs2/exceptions.pyr   r      s        ,,,,r   r   c                       e Zd ZdZdS )r   z?Framerate was not specified and couldn't be inferred otherwise.Nr   r   r   r   r   r      s        IIIIr   r   c                   8     e Zd ZdZdeddf fdZdefdZ xZS )r   aJ  
    File extension does not pertain to any known subtitle format.

    This exception is raised by `SSAFile.save()` when the ``format_`` parameter
    is not specified. It will try to guess the desired format from output filename
    and raise this exception when it fails.

    Attributes:
        ext (str): File extension
    extreturnNc                 d    || _         d|d}t                                          |           d S )NzFile extension - does not match any supported subtitle format)r   super__init__)selfr   msg	__class__s      r   r   z"UnknownFileExtensionError.__init__    s8    TTTTr   c                      | j         | j        ffS N)r   r   r   s    r   
__reduce__z$UnknownFileExtensionError.__reduce__%   s    ~{**r   	r   r   r   r   strr   r   r!   __classcell__r   s   @r   r   r      sp        	 	C D      
+C + + + + + + + +r   r   c                   8     e Zd ZdZdeddf fdZdefdZ xZS )r   z
    Unknown subtitle format identifier (ie. string like ``"srt"``).

    This exception is used when interpreting ``format_`` parameter fails,
    eg. in `SSAFile.save()`.

    Attributes:
        format_ (str): Format identifier
    format_r   Nc                 d    || _         d|d}t                                          |           d S )NzFormat identifier r   )r'   r   r   )r   r'   r   r   s      r   r   z%UnknownFormatIdentifierError.__init__4   s8    [7[[[r   c                      | j         | j        ffS r   )r   r'   r    s    r   r!   z'UnknownFormatIdentifierError.__reduce__9   s    ~..r   r"   r%   s   @r   r   r   )   sp                
/C / / / / / / / /r   r   c                   H     e Zd ZdZdedee         ddf fdZdefdZ xZ	S )r	   a  
    Subtitle format is ambiguous or unknown based on analysis of file fragment

    This exception is raised by `SSAFile.load()` and related methods
    when the ``format_`` parameter is not specified. It will try to guess
    the input format based on reading first few kilobytes of the input file
    and raise this exception if the format cannot be uniquely determined.

    Attributes:
        content (str): Analyzed subtitle file content
        formats (list[str]): Format identifiers for detected formats
    contentformatsr   Nc                 |    || _         || _        |sd}nd|d}t                                          |           d S )NzNo suitable formatszMultiple suitable formats ())r+   r,   r   r   )r   r+   r,   r   r   s       r   r   z!FormatAutodetectionError.__init__J   sN     	='CC<<<<Cr   c                 ,    | j         | j        | j        ffS r   )r   r+   r,   r    s    r   r!   z#FormatAutodetectionError.__reduce__S   s    ~dl;;;r   )
r   r   r   r   r#   r   r   r   r!   r$   r%   s   @r   r	   r	   =   s{          d3i D      <C < < < < < < < <r   r	   N)
typingr   r   __all__	Exceptionr   r   r   r   r	   r   r   r   <module>r3      s            - - - - -9 - - -J J J J Jl J J J+ + + + + + + +*/ / / / /< / / /(< < < < <| < < < < <r   