a
    Df                     @  sT   d dl mZ d dlmZmZmZ dddddZdd	d
ddZdddddZdS )    )annotations)FillTypeLineTypeZInterpzFillType | strr   )	fill_typereturnc              
   C  sX   t | trPztj|  W S  tyL } ztd|  d|W Y d}~qTd}~0 0 n| S dS )zCoerce a FillType or string value to a FillType.

    Args:
        fill_type (FillType or str): Value to convert.

    Return:
        FillType: Converted value.
    'z' is not a valid FillTypeN)
isinstancestrr   __members__KeyError
ValueError)r   e r   `/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/contourpy/enum_util.pyas_fill_type   s    	
*r   zLineType | strr   )	line_typer   c              
   C  sX   t | trPztj|  W S  tyL } ztd|  d|W Y d}~qTd}~0 0 n| S dS )zCoerce a LineType or string value to a LineType.

    Args:
        line_type (LineType or str): Value to convert.

    Return:
        LineType: Converted value.
    r   z' is not a valid LineTypeN)r	   r
   r   r   r   r   )r   r   r   r   r   as_line_type   s    	
*r   zZInterp | strr   )z_interpr   c              
   C  sX   t | trPztj|  W S  tyL } ztd|  d|W Y d}~qTd}~0 0 n| S dS )zCoerce a ZInterp or string value to a ZInterp.

    Args:
        z_interp (ZInterp or str): Value to convert.

    Return:
        ZInterp: Converted value.
    r   z' is not a valid ZInterpN)r	   r
   r   r   r   r   )r   r   r   r   r   as_z_interp*   s    	
*r   N)	
__future__r   Zcontourpy._contourpyr   r   r   r   r   r   r   r   r   r   <module>   s   