ó
    pyüi  ã                   óŒ   • S SK r S SKJr  S SKJr  S SKJrJr  S\4S jr	SS.S\S\\   S	\S-  4S
 jjr
SS.S\S\S-  4S jjrg)é    N)ÚIterable)Úwraps)Ú	ParameterÚ	signatureÚversionc                 ó   ^ • U 4S jnU$ )a*  Decorator for methods that issues warnings for positional arguments.
Using the keyword-only argument syntax in pep 3102, arguments after the
* will issue a warning when passed as a positional argument.

Args:
    version (`str`):
        The version when positional arguments will result in error.
c                 óh  >^ ^^^• [        T 5      m/ m/ mTR                  R                  5        Hg  u  pUR                  [        R
                  :X  a  TR                  U5        M6  UR                  [        R                  :X  d  MV  TR                  U5        Mi     [        T 5      UU UUU4S j5       nU$ )Nc            	      óÄ  >• [        U 5      [        T5      -
  nUS::  a  T" U 0 UD6$ [        TS U X* S  5       VVs/ s H)  u  p4[        U[        5      (       a  U SU S3OU SU 3PM+     nnnSR	                  U5      n[
        R                  " STR                   SU ST
 S	3[        5        UR                  [        T	R                  U 5      5        T" S
0 UD6$ s  snnf )Nr   z='Ú'Ú=ú, z+Deprecated positional argument(s) used in 'z': pass z as keyword args. From version z? passing these as positional arguments will result in an error,© )ÚlenÚzipÚ
isinstanceÚstrÚjoinÚwarningsÚwarnÚ__name__ÚFutureWarningÚupdateÚ
parameters)ÚargsÚkwargsÚ
extra_argsÚnameÚargÚargs_msgÚall_argsÚfÚkwonly_argsÚsigr   s         €€€€€Ú_/home/mande/repo/quber/.venv/lib/python3.13/site-packages/huggingface_hub/utils/_deprecation.pyÚinner_fÚU_deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f   s  ø€ ä˜T›¤S¨£]Ñ2ˆJØ˜Q‹Ù˜$Ð) &Ñ)Ð)ô "% [°°*Ð%=¸tÀKÀLÐ?QÔ!Rôâ!R‘I�Dô &0°´S×%9Ñ%9�4�&˜˜3˜%˜qÑ!À$ÀÀqÈÈ¸ÒNÙ!Rð ñ ð —y‘y Ó*ˆHÜ�MŠMØ=¸a¿j¹j¸\ð JØ�:Ð<¸W¸Ið FDðDô ô	ð �M‰Mœ#˜cŸn™n¨dÓ3Ô4Ù‘;�v‘;Ðùós   ¼0C)	r   r   ÚitemsÚkindr   ÚPOSITIONAL_OR_KEYWORDÚappendÚKEYWORD_ONLYr   )r!   r   Úparamr%   r    r"   r#   r   s   `   @@@€r$   Ú _inner_deprecate_positional_argsÚD_deprecate_positional_args.<locals>._inner_deprecate_positional_args   s‘   ü€ Ü˜‹lˆØˆØˆØŸ>™>×/Ñ/Ö1‰KˆDØ�z‰zœY×<Ñ<Ó<Ø—‘ Ö%Ø—‘œy×5Ñ5Õ5Ø×"Ñ" 4Ö(ñ	 2ô 
ˆq‹÷	ð 	ó 
ð	ð& ˆó    r   )r   r-   s   ` r$   Ú_deprecate_positional_argsr0      s   ø€ õð@ ,Ð+r/   )Úcustom_messageÚdeprecated_argsr1   c                 ó   ^ ^^• UUU 4S jnU$ )aÃ  Decorator to issue warnings when using deprecated arguments.

TODO: could be useful to be able to set a custom error message.

Args:
    version (`str`):
        The version when deprecated arguments will result in error.
    deprecated_args (`list[str]`):
        List of the arguments to be deprecated.
    custom_message (`str`, *optional*):
        Warning message that is raised. If not passed, a default warning message
        will be created.
c                 óR   >^ ^• [        T 5      m[        T 5      UUU UU4S j5       nU$ )Nc                  ó"  >• / n[        U TR                  R                  5       5       H2  u  p4UR                  T	;   d  M  UR	                  UR                  5        M4     UR                  5        H=  u  pVUT	;   d  M  UTR                  U   R                  :w  d  M,  UR	                  U5        M?     [        U5      S:”  aK  ST
R                   SSR                  U5       ST S3nTb  UST-   -  n[        R                  " U[        5        T
" U 0 UD6$ )Nr   z Deprecated argument(s) used in 'z': r   z&. Will not be supported from version 'ú'.z

)r   r   Úvaluesr   r*   r'   Údefaultr   r   r   r   r   r   )r   r   Úused_deprecated_argsÚ_Ú	parameterÚ
kwarg_nameÚkwarg_valueÚmessager1   r2   r!   r#   r   s           €€€€€r$   r%   ÚO_deprecate_arguments.<locals>._inner_deprecate_positional_args.<locals>.inner_fK   s
  ø€ ð $&Ð Ü # D¨#¯.©.×*?Ñ*?Ó*AÖ B‘�Ø—>‘> _Õ4Ø(×/Ñ/°	·±Ö?ñ !Cð ,2¯<©<®>Ñ'�
ð  /Õ1à# s§~¡~°jÑ'A×'IÑ'IÕIà(×/Ñ/°
Ö;ñ ,:ô Ð'Ó(¨1Ó,à6°q·z±z°lð CØŸ	™	Ð"6Ó7Ð8ð 9!Ø!( 	¨ð-ð ð
 "Ñ-Ø˜v¨Ñ6Ñ6�GÜ—’˜g¤}Ô5Ù�dÐ%˜fÑ%Ð%r/   )r   r   )r!   r%   r#   r1   r2   r   s   ` @€€€r$   r-   Ú>_deprecate_arguments.<locals>._inner_deprecate_positional_argsH   s.   ú€ Ü˜‹lˆä	ˆq‹÷	&ð 	&ó 
ð	&ð6 ˆr/   r   )r   r2   r1   r-   s   ``` r$   Ú_deprecate_argumentsrA   4   s   ú€ ÷(ðB ,Ð+r/   )r>   r>   c                 ó   ^ ^• UU 4S jnU$ )a'  Decorator to issue warnings when using a deprecated method.

Args:
    version (`str`):
        The version when deprecated arguments will result in error.
    message (`str`, *optional*):
        Warning message that is raised. If not passed, a default warning message
        will be created.
c                 óš   >^ ^• T R                   mTS:X  a  T R                  R                  S5      S   m[        T 5      U UUU4S j5       nU$ )NÚ__init__Ú.r   c                  óŒ   >• ST STR                    ST S3nTb  UST-   -  n[        R                  " U[        5        T" U 0 UD6$ )Nr   z	' (from 'z3') is deprecated and will be removed from version 'r6   Ú )Ú
__module__r   r   r   )r   r   Úwarning_messager!   r>   r   r   s      €€€€r$   r%   ÚC_deprecate_method.<locals>._inner_deprecate_method.<locals>.inner_f|   s^   ø€ ð �D�6˜ 1§<¡< .Ð0cÐdkÐclÐlnÐoð ð Ñ"Ø 3¨¡=Ñ0�Ü�MŠM˜/¬=Ô9Ù�dÐ%˜fÑ%Ð%r/   )r   Ú__qualname__Úsplitr   )r!   r%   r   r>   r   s   ` @€€r$   Ú_inner_deprecate_methodÚ2_deprecate_method.<locals>._inner_deprecate_methodw   sJ   ú€ Ø�z‰zˆØ�:ÓØ—>‘>×'Ñ'¨Ó,¨QÑ/ˆDä	ˆq‹÷	&ó 
ð	&ð ˆr/   r   )r   r>   rM   s   `` r$   Ú_deprecate_methodrO   l   s   ù€ öð" #Ð"r/   )r   Úcollections.abcr   Ú	functoolsr   Úinspectr   r   r   r0   rA   rO   r   r/   r$   Ú<module>rS      sj   ðÛ Ý $Ý ß (ð*,¨3ô *,ðb "&ò	5,àð5,ð ˜c‘]ð5,ð ˜$‘Jõ	5,ðp >Bò # #ð #°°d±
ö #r/   