
    gT                    V    d dl mZ d dlZd dlmZmZ ddZ e       d	 	 	 	 	 	 	 ddZy)	    )annotationsN)AnyCallablec                H    t        j                  |       }||j                  v S )zBReturns whether or not the given function has a specific parameter)inspect	signature
parameters)funcarg_namesigs      Q/var/www/openai/venv/lib/python3.12/site-packages/anthropic/_utils/_reflection.pyfunction_has_argumentr      s!    


D
!Cs~~%%    )exclude_paramsc                  t        j                  |      }t        j                  |       }g }|j                  j                         D ]  \  }}||v r|j                  j	                  |      }|s|j                  d| d       >|j                  |j                  k7  sX|j                  d| dt        |j                         dt        |j                                 |r)t        t        |       ddj                  |      z         y)	zCEnsure that the signature of the second function matches the first.zthe `z` param is missingztypes for the `z!` param are do not match; source=z
 checking=z0 errors encountered when comparing signatures:

z

N)r   r   r	   itemsgetappend
annotationreprAssertionErrorlenjoin)	source_func
check_funcr   	check_sig
source_sigerrorsnamesource_paramcustom_params	            r   assert_signatures_in_syncr"      s%    !!*-I"";/JF(3399;l>! ++//5MME$'9:;""l&=&==MM!$'HlNeNeIfHggqrv  xD  xO  xO  sP  rQ  R  < F},^_bhbmbmntbuuvv r   )r
   Callable[..., Any]r   strreturnbool)r   r#   r   r#   r   zset[str]r%   None)	
__future__r   r   typingr   r   r   setr"    r   r   <module>r,      sH    "   &  #u	w#w"w 	w
 
wr   