ó
    °"³jÚ  ã                  ó    • S SK Jr  S SKrS SKrS SKrS SKJrJr  S	S jrS
S jr	\
" 5       S.       SS jjr\
" 5       S.       SS jjrg)é    )ÚannotationsN)ÚAnyÚCallablec                ó®   • [         R                  S:¼  a,  SSKn[        R                  " XR
                  R                  S9$ [        R                  " U 5      $ )a®  Like `inspect.signature()`, for callers that only need parameter names, kinds and defaults.

Python 3.14 evaluates annotations lazily and `inspect.signature()` evaluates them by default, so a
function annotated with a name that only exists under `TYPE_CHECKING` makes it raise `NameError`.
Here the annotations come back as strings on 3.14+ and are never evaluated. On older versions
they are whatever the function already holds.
)é   é   r   N)Úannotation_format)ÚsysÚversion_infoÚannotationlibÚinspectÚ	signatureÚFormatÚSTRING)Úfuncr   s     ÚY/home/mande/repo/quber/.venv/lib/python3.13/site-packages/anthropic/_utils/_reflection.pyÚ(signature_without_evaluating_annotationsr   	   sC   € ô ×Ñ˜7Ó"Ûä× Ò  ×9MÑ9M×9TÑ9TÑUÐUÜ×Ò˜TÓ"Ð"ó    c                ó4   • [        U 5      nXR                  ;   $ )zBReturns whether or not the given function has a specific parameter)r   Ú
parameters)r   Úarg_nameÚsigs      r   Úfunction_has_argumentr      s   € ä
2°4Ó
8€CØ—~‘~Ñ%Ð%r   )Úexclude_paramsc               ó>  • [         R                  " U5      n[         R                  " U 5      n/ nUR                  R                  5        H¡  u  pgXb;   a  M  UR                  R	                  U5      nU(       d  UR                  SU S35        ME  UR                  UR                  :w  d  Ma  UR                  SU S[        UR                  5       S[        UR                  5       35        M£     U(       a)  [        [        U5       S3SR                  U5      -   5      eg)	zCEnsure that the signature of the second function matches the first.zthe `ú` param is missingztypes for the `z!` param are do not match; source=z
 checking=z0 errors encountered when comparing signatures:

ú

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Ö;ÑˆØÓ!Ùà ×+Ñ+×/Ñ/°Ó5ˆÞØ�M‰M˜E $ Ð'9Ð:Ô;Ùà×"Ñ" l×&=Ñ&=Õ=Ø�M‰MØ! $ Ð'HÌÈl×NeÑNeÓIfÐHgÐgqÔrvð  xD÷  xOñ  xOó  sPð  rQð  Rôñ ñ <ö Ü¤ F£˜}Ð,^Ð_Ðbh×bmÑbmÐntÓbuÑuÓvÐvð r   c               óÊ  • [         R                  " U 5      n[        R                  " U5      nU(       d  [	        SU< 35      e/ n[        U5       Hà  u  pg[         R                  " U5      nUR                  R                  5        H§  u  pšX’;   a  M  UR                  R                  U	5      nU(       d  UR                  SU SU	 S35        MH  UR                  U
R                  :w  d  Md  UR                  SU SU	 S[        U
R                  5       S[        UR                  5       35        M©     Mâ     U(       a)  [	        [        U5       S3S	R                  U5      -   5      eg
)zTEnsure that every @overload of overloaded_func contains all params from source_func.z#No @overload definitions found for z	overload z: `r   z: types for `z` do not match; source=z
 overload=z9 errors encountered when comparing overload signatures:

r   N)r   r   Útyping_extensionsÚget_overloadsr#   Ú	enumerater   r   r   r    r!   r"   r$   r%   )r&   Úoverloaded_funcr   r)   Ú	overloadsr*   ÚiÚoverload_fnÚoverload_sigr+   r,   Úoverload_params               r   Úassert_overloads_in_syncr9   >   sg  € ô ×"Ò" ;Ó/€JÜ!×/Ò/°Ó@€IæÜÐBÀ?ÑBUÐVÓWÐWà€Fä# IÖ.‰ˆÜ×(Ò(¨Ó5ˆØ",×"7Ñ"7×"=Ñ"=Ö"?ÑˆDØÓ%Ùà)×4Ñ4×8Ñ8¸Ó>ˆNÞ!Ø—‘ 	¨!¨¨C°¨vÐ5GÐHÔIÙà×(Ñ(¨L×,CÑ,CÕCØ—‘Ø ˜s -°¨vÐ5LÌTÐR^×RiÑRiÓMjÐLkÐkuÔvzð  |J÷  |Uñ  |Uó  wVð  vWð  Xöó #@ñ /ö  ÜÜ�6‹{ˆmÐVÐWÐZ`×ZeÑZeÐflÓZmÑmó
ð 	
ð r   )r   úCallable[..., Any]Úreturnzinspect.Signature)r   r:   r   Ústrr;   Úbool)r&   r:   r'   r:   r   úset[str]r;   ÚNone)r&   r:   r3   r:   r   r>   r;   r?   )Ú
__future__r   r
   r   r0   Útypingr   r   r   r   Úsetr.   r9   © r   r   Ú<module>rD      s„   ðÝ "ã 
Û Û ß  ô#ô&ñ  #›uñ	wØ#ðwà"ðwð ð	wð
 
õwñH  #›uñ	"
Ø#ð"
à'ð"
ð ð	"
ð
 
ö"
r   