U
     e&                     @   sP   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d
S )    )Optionalc                   @   s   e Zd ZdZdS )UnknownFileFormatz=
    The file format could not be automatically detected
    N)__name__
__module____qualname____doc__ r   r   /lib/python3.8/site-packages/dnaio/exceptions.pyr      s   r   c                       s8   e Zd ZdZdZeee d fddZdd Z	  Z
S )FileFormatErrorz
    The file is not formatted correctly

    Attributes:
        line: If available, the number of the line at which the error occurred
          or None if not.
          The first line has index 0.
    Zsequence)msglinec                    s   t  || || _|| _d S )N)super__init__messager   )selfr   r   	__class__r   r	   r      s    zFileFormatError.__init__c                 C   s8   | j d krdnd| j d  }d| j d| d| j S )Nzunknown linezline    z	Error in z	 file at z: )r   formatr   )r   r   r   r   r	   __str__   s    zFileFormatError.__str__)r   r   r   r   r   strr   intr   r   __classcell__r   r   r   r	   r
   
   s   	r
   c                   @   s   e Zd ZdZdZdS )FastqFormatErrorz3
    The FASTQ file is not formatted correctly
    ZFASTQNr   r   r   r   r   r   r   r   r	   r       s   r   c                   @   s   e Zd ZdZdZdS )FastaFormatErrorz3
    The FASTA file is not formatted correctly
    ZFASTANr   r   r   r   r	   r   (   s   r   N)typingr   	Exceptionr   r
   r   r   r   r   r   r	   <module>   s   