a
    w=icˆ	  ã                   @   st   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d	„ d	eƒZG d
d„ deƒZG dd„ deƒZdS )c                   @   s   e Zd ZdZdS )ÚErrorz0Base Cu2Qu exception class for all other errors.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úg/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/fontTools/cu2qu/errors.pyr      s   r   c                       s   e Zd Z‡ fdd„Z‡  ZS )ÚApproxNotFoundErrorc                    s   d| }t ƒ  |¡ || _d S )Nzno approximation found: %s)ÚsuperÚ__init__Úcurve)Úselfr   Úmessage©Ú	__class__r   r   r
      s    zApproxNotFoundError.__init__)r   r   r   r
   Ú__classcell__r   r   r   r   r      s   r   c                   @   s   e Zd ZdS )ÚUnequalZipLengthsErrorN)r   r   r   r   r   r   r   r      s   r   c                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚIncompatibleGlyphsErrorc                 C   sX   t |ƒdksJ ‚|| _tdd„ |D ƒƒ}t |ƒdkrJdd t|ƒ¡ | _n
| ¡ | _d S )Né   c                 s   s   | ]}t |jƒV  qd S ©N)ÚreprÚname©Ú.0Úgr   r   r   Ú	<genexpr>"   ó    z3IncompatibleGlyphsError.__init__.<locals>.<genexpr>z{%s}ú, )ÚlenÚglyphsÚsetÚjoinÚsortedÚcombined_nameÚpop)r   r   Únamesr   r   r   r
      s    z IncompatibleGlyphsError.__init__c                 C   s   dt | ƒj| jf S )Nz<%s %s>)Útyper   r"   ©r   r   r   r   Ú__repr__(   s    z IncompatibleGlyphsError.__repr__N)r   r   r   r
   r'   r   r   r   r   r      s   	r   c                   @   s   e Zd Zdd„ ZdS )ÚIncompatibleSegmentNumberErrorc                 C   s
   d| j  S )Nz1Glyphs named %s have different number of segments)r"   r&   r   r   r   Ú__str__-   s    ÿz&IncompatibleSegmentNumberError.__str__N)r   r   r   r)   r   r   r   r   r(   ,   s   r(   c                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚIncompatibleSegmentTypesErrorc                 C   s   t  | |¡ || _d S r   )r   r
   Úsegments)r   r   r+   r   r   r   r
   4   s    z&IncompatibleSegmentTypesError.__init__c              	   C   sn   g }t tt| jƒƒƒ}t| j ¡ ƒD ]4\}}| dt|ƒ |¡d dd„ |D ƒ¡f ¡ q$d| j	d |¡f S )Nz%s: (%s)r   c                 s   s   | ]}t |ƒV  qd S r   ©r   )r   Útr   r   r   r   =   r   z8IncompatibleSegmentTypesError.__str__.<locals>.<genexpr>z5Glyphs named %s have incompatible segment types:
  %sz
  )
r   ÚstrÚmaxr+   r!   ÚitemsÚappendÚrjustr    r"   )r   ÚlinesÚndigitsÚiÚtagsr   r   r   r)   8   s    $ÿþz%IncompatibleSegmentTypesError.__str__N©r   r   r   r
   r)   r   r   r   r   r*   3   s   r*   c                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚIncompatibleFontsErrorc                 C   s
   || _ d S r   )Úglyph_errors)r   r9   r   r   r   r
   F   s    zIncompatibleFontsError.__init__c                 C   s"   dd  dd„ t| j ¡ ƒD ƒ¡ S )Nz&fonts contains incompatible glyphs: %sr   c                 s   s   | ]}t |ƒV  qd S r   r,   r   r   r   r   r   K   r   z1IncompatibleFontsError.__str__.<locals>.<genexpr>)r    r!   r9   Úkeysr&   r   r   r   r)   I   s    ÿzIncompatibleFontsError.__str__Nr7   r   r   r   r   r8   E   s   r8   N)Ú	Exceptionr   r   r   r   r(   r*   r8   r   r   r   r   Ú<module>   s   