
    kj                         d dl mZmZmZ d dlZd dlmZmZ ddlmZ erddl	m
Z
 dee         ded	efd
Z G d dej                  Z G d de          ZdS )    )IterableSequenceTYPE_CHECKINGN)Context	Parameter   join_param_labels)
Constraintparamsdescreturnc                 ,    dt          |           d|S )Nz(the following constraint on parameters [z] was not satisfied: r	   )r   r   s     W/home/agentuser/manim-venv/lib/python3.11/site-packages/cloup/constraints/exceptions.pydefault_constraint_errorr      s%      V$$$$dd	,    c                   ~     e Zd Zdededddeej                 f fdZe	dededddee         dd f
d	            Z
 xZS )
ConstraintViolatedmessagectx
constraintr   r   c                 x    t                                          ||           || _        || _        || _        d S )N)r   )super__init__r   r   r   )selfr   r   r   r   	__class__s        r   r   zConstraintViolated.__init__   s;     	c***$r   r   r   c                 D    t          t          ||          |||          S )N)r   r   r   )r   r   )clsr   r   r   r   s        r   defaultzConstraintViolated.default   s/     "$VT22
6
 
 
 	
r   )__name__
__module____qualname__strr   r   clickr   r   classmethodr   __classcell__r   s   @r   r   r      s        			 !	 )		 	 	 	 	 	 



 

 !	


 #

 


 

 

 [

 

 

 

 

r   r   c                   <     e Zd ZdZdddee         def fdZ xZS )UnsatisfiableConstraintzRaised if a constraint cannot be satisfied by a group of parameters
    independently from their values at runtime; e.g. ``mutually_exclusive`` cannot
    be satisfied if multiple of the parameters are required.r   r   r   reasonc                     || _         || _        || _        t          |          }d| d| d| }t	                                          |           d S )Nz
the constraint z
defined on parameters [z]
cannot be satisfied because )r   r   r*   r
   r   r   )r   r   r   r*   param_namesr   r   s         r   r   z UnsatisfiableConstraint.__init__2   st     %'//;z ; ;-8; ;28; ; 	!!!!!r   )	r    r!   r"   __doc__r   r   r#   r   r&   r'   s   @r   r)   r)   -   sf        @ @
"&
"080C
"MP
" 
" 
" 
" 
" 
" 
" 
" 
" 
"r   r)   )typingr   r   r   r$   r   r   commonr
   _corer   r#   r   
UsageErrorr   	Exceptionr)    r   r   <module>r4      s    4 4 4 4 4 4 4 4 4 4  $ $ $ $ $ $ $ $ % % % % % % "!!!!!!Xi%8      
 
 
 
 
) 
 
 
4" " " " "i " " " " "r   