+
    NV-jF:  ã                  óx  € R t ^ RIHt ^ RIHtHt ^ RIHtHt ^ RI	t
^ RIHt ^ RIHt ^ RIHtHt ]! R]]4      t]! R	]]R4      tR
 R ltR R ltR R ltR R ltR R ltR R ltR,R R lltR R ltR-R R lltR R lt]R R l4       t ]R  R! l4       t R" R# lt R$ R% lt!R& R' lt"R( R) lt#R* R+ lt$R# ).zV
Module that contains many useful utilities
for validating data or function arguments
)Úannotations)ÚIterableÚSequence)ÚTypeVarÚoverloadN)Úlib)ÚNA)Úis_boolÚ
is_integerÚBoolishTÚBoolishNoneTc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "Úh/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/pandas/util/_validators.pyÚ__annotate__r      s   € ÷ 
ñ 
Èñ 
ó    c           
     óè   € V^ 8  d   \        R4      h\        V4      \        V4      8”  dG   \        V4      V,           p\        V4      V,           pV^8X  d   RMRp\        V  RV RV RV R24      hR# )	z°
Checks whether 'args' has length of at most 'compat_args'. Raises
a TypeError if that is not the case, similar to in Python when a
function is called with too many arguments.
z*'max_fname_arg_count' must be non-negativeÚargumentÚ	argumentsz() takes at most Ú z (z given)N)Ú
ValueErrorÚlenÚ	TypeError)ÚfnameÚargsÚmax_fname_arg_countÚcompat_argsÚmax_arg_countÚactual_arg_countr   s   &&&&   r   Ú_check_arg_lengthr$      sŽ   € ð ˜QÔÜÐEÓFÐFä
ˆ4ƒy”3�{Ó#Ô#Ü˜KÓ(Ð+>Õ>ˆÜ˜t›9Ð':Õ:ÐØ!.°!Ô!3‘:¸ˆäØˆgÐ& } o°Q°x°jð AØ Ð! ð*ó
ð 	
ñ $r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   3   s   € ÷ #ñ #À4ñ #r   c                ó  € V Fb  p W,          pW#,          pVe   Ve	   Vf   Ve   RpMWE8H  p\        V4      '       g   \        R4      h V'       d   KR  \        RV RV  R24      h	  R#   \         d    Y,          Y#,          J p L=i ; i)zä
Check that the keys in `arg_val_dict` are mapped to their
default values as specified in `compat_args`.

Note that this function is to be called only when it has been
checked that arg_val_dict.keys() is a subset of compat_args
NFz'match' is not a booleanzthe 'z=' parameter is not supported in the pandas implementation of z())r	   r   )r   Úarg_val_dictr!   ÚkeyÚv1Úv2Úmatchs   &&&    r   Ú_check_for_default_valuesr,   3   s©   € ó ˆð	:ØÕ"ˆBØÕ!ˆBð ’ 2¢:°2²:À"Â.Ø‘à™�ä˜5—>’>Ü Ð!;Ó<Ð<ð "÷ ‰uÜØ˜�uð 0Ø05¨w°bð:óð ó1 øô( ô 	:Ø Õ%¨Õ)9Ð9ŠEð	:ús   ‡AA+Á+B	ÂB	c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   Y   s   € ÷ &:ñ &:ÀDñ &:r   c                ób   € \        WW#4       \        \        W1RR7      4      p\        WV4       R# )a–  
Checks whether the length of the `*args` argument passed into a function
has at most `len(compat_args)` arguments and whether or not all of these
elements in `args` are set to their default values.

Parameters
----------
fname : str
    The name of the function being passed the `*args` parameter
args : tuple
    The `*args` parameter passed into a function
max_fname_arg_count : int
    The maximum number of arguments that the function `fname`
    can accept, excluding those in `args`. Used for displaying
    appropriate error messages. Must be non-negative.
compat_args : dict
    A dictionary of keys and their associated default values.
    In order to accommodate buggy behaviour in some versions of `numpy`,
    where a signature displayed keyword arguments but then passed those
    arguments **positionally** internally when calling downstream
    implementations, a dict ensures that the original
    order of the keyword arguments is enforced.

Raises
------
TypeError
    If `args` contains more values than there are `compat_args`
ValueError
    If `args` contains values that do not correspond to those
    of the default values specified in `compat_args`
F©ÚstrictN)r$   ÚdictÚzipr,   )r   r   r    r!   Úkwargss   &&&& r   Úvalidate_argsr4   Y   s-   € ô@ �eÐ#6ÔDô
 ”#�k°Ô6Ó7€FÜ˜e¨[Ö9r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   ‚   s   € ÷ 
Uñ 
U¸4ñ 
Ur   c                ó–   € \        V4      \        V4      ,
          pV'       d&   \        \        V4      4      p\        V  RV R24      hR# )zq
Checks whether 'kwargs' contains any keys that are not
in 'compat_args' and raises a TypeError if there is one.
z'() got an unexpected keyword argument 'Ú'N)ÚsetÚnextÚiterr   )r   r3   r!   ÚdiffÚbad_args   &&&  r   Ú_check_for_invalid_keysr=   ‚   sG   € ô ˆv‹;œ˜[Ó)Õ)€DçÜ”t˜D“zÓ"ˆÜ˜5˜'Ð!HÈÈ	ÐQRÐSÓTÐTñ r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   �   s   € ÷ 8ñ 8°4ñ 8r   c                óV   € VP                  4       p\        WV4       \        WV4       R# )a–  
Checks whether parameters passed to the **kwargs argument in a
function `fname` are valid parameters as specified in `*compat_args`
and whether or not they are set to their default values.

Parameters
----------
fname : str
    The name of the function being passed the `**kwargs` parameter
kwargs : dict
    The `**kwargs` parameter passed into `fname`
compat_args: dict
    A dictionary of keys that `kwargs` is allowed to have and their
    associated default values

Raises
------
TypeError if `kwargs` contains keys not in `compat_args`
ValueError if `kwargs` contains keys in `compat_args` that do not
map to the default values specified in `compat_args`
N)Úcopyr=   r,   )r   r3   r!   Úkwdss   &&& r   Úvalidate_kwargsrB   �   s#   € ð, �;‰;‹=€DÜ˜E¨;Ô7Ü˜e¨;Ö7r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   ª   s   € ÷ 70ñ 70à	ñ70r   c                ó   € \        W\        VP                  4       4      ,           W44       \        \	        WARR7      4      pV F  pWb9   g   K  \        V  RV R24      h	  VP                  V4       \        WV4       R# )a…  
Checks whether parameters passed to the *args and **kwargs argument in a
function `fname` are valid parameters as specified in `*compat_args`
and whether or not they are set to their default values.

Parameters
----------
fname: str
    The name of the function being passed the `**kwargs` parameter
args: tuple
    The `*args` parameter passed into a function
kwargs: dict
    The `**kwargs` parameter passed into `fname`
max_fname_arg_count: int
    The minimum number of arguments that the function `fname`
    requires, excluding those in `args`. Used for displaying
    appropriate error messages. Must be non-negative.
compat_args: dict
    A dictionary of keys that `kwargs` is allowed to
    have and their associated default values.

Raises
------
TypeError if `args` contains more values than there are
`compat_args` OR `kwargs` contains keys not in `compat_args`
ValueError if `args` contains values not at the default value (`None`)
`kwargs` contains keys in `compat_args` that do not map to the default
value as specified in `compat_args`

See Also
--------
validate_args : Purely args validation.
validate_kwargs : Purely kwargs validation.

Fr/   z-() got multiple values for keyword argument 'r7   N)r$   ÚtupleÚvaluesr1   r2   r   ÚupdaterB   )r   r   r3   r    r!   Ú	args_dictr(   s   &&&&&  r   Úvalidate_args_and_kwargsrI   ª   s{   € ôP Ø”e˜FŸM™M›OÓ,Õ,Ð.Aôô ”S˜°5Ô9Ó:€IãˆØŽ=ÜØ�'ÐFÀsÀeÈ1ÐMóð ñ ð ‡M�M�)ÔÜ�E ;Ö/r   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   Úvaluer   Úarg_nameÚstrÚnone_allowedÚboolÚint_allowedr   r   )r   s   "r   r   r   ä   s:   € ÷ *ñ *Øð*àð*ð ð*ð ð	*ð
 ñ*r   c                óæ   € \        V 4      pV'       d   T;'       g    V RJ pV'       d   T;'       g    \        V \        4      pV'       g&   \        RV R\	        V 4      P
                   R24      hV # )a  
Ensure that argument passed in arg_name can be interpreted as boolean.

Parameters
----------
value : bool
    Value to be validated.
arg_name : str
    Name of the argument. To be reflected in the error message.
none_allowed : bool, default True
    Whether to consider None to be a valid boolean.
int_allowed : bool, default False
    Whether to consider integer value to be a valid boolean.

Returns
-------
value
    The same value as input.

Raises
------
ValueError
    If the value is not a valid boolean.
NzFor argument "z$" expected type bool, received type Ú.)r	   Ú
isinstanceÚintr   ÚtypeÚ__name__)rK   rL   rN   rP   Ú
good_values   &&&& r   Úvalidate_bool_kwargrX   ä   sr   € ô< ˜“€JßØ×2Ð2 E¨T Mˆ
çØ×9Ð9¤:¨e´SÓ#9ˆ
çÜØ˜X˜Jð 'Ü˜“K×(Ñ(Ð)¨ð,ó
ð 	
ð €Lr   c               ó   € V ^8„  d   QhRR/# )r   ÚnamerM   r   )r   s   "r   r   r     s   € ÷ Yñ Y ñ Yr   c                ó  € V \         P                  J g]   \        V \        4      '       gG   V eC   V \        J g9   \         P
                  ! V 4      '       d   \        P                  ! V 4      '       d   R# \        V RV  24      h)zð
Validate na arguments.

Parameters
----------
value : object
    Value to validate.
name : str
    Name of the argument, used to raise an informative error message.

Raises
______
ValueError
    When ``value`` is determined to be invalid.
Nz2 must be None, pd.NA, np.nan, True, or False; got )	r   Ú
no_defaultrS   rO   r   Úis_floatÚnpÚisnanr   )rK   rZ   s   &&r   Úvalidate_na_argr`     s_   € ð" 	”—‘ÓÜ�eœT×"Ò"ØŠ=Ø”B‹;Ü�LŠL˜×Ò¤B§H¢H¨U§O¢OáÜ
˜�vÐOÐPUÈwÐWÓ
XÐXr   c               ó   € V ^8„  d   QhRR/# )r   Úvalidate_scalar_dict_valuerO   r   )r   s   "r   r   r   ,  s   € ÷ $ñ $Àdñ $r   c                ó(  € ^ RI Hp V f   Vf   \        R4      hV f   Ve   V! V4      pW3# V eN   VfJ   V'       d?   \        V \        \
        34      '       d#   \        R\        V 4      P                   R24      hW3# V e   Ve   \        R4      hW3# )aì  
Validate the keyword arguments to 'fillna'.

This checks that exactly one of 'value' and 'method' is specified.
If 'method' is specified, this validates that it's a valid method.

Parameters
----------
value, method : object
    The 'value' and 'method' keyword arguments for 'fillna'.
validate_scalar_dict_value : bool, default True
    Whether to validate that 'value' is a scalar or dict. Specifically,
    validate that it is not a list or tuple.

Returns
-------
value, method : object
)Úclean_fill_methodz(Must specify a fill 'value' or 'method'.z>"value" parameter must be a scalar or dict, but you passed a "Ú"z)Cannot specify both 'value' and 'method'.)	Úpandas.core.missingrd   r   rS   ÚlistrE   r   rU   rV   )rK   Úmethodrb   rd   s   &&& r   Úvalidate_fillna_kwargsri   ,  s­   € õ& 6à‚}˜šÜÐCÓDÐDØ‚}˜Ò+Ù" 6Ó*ˆð ˆ=Ðð 
Ò	˜vš~ß%¬*°U¼TÄ5¸M×*JÒ*JÜð!Ü!% e£×!5Ñ!5Ð 6°að9óð ð ˆ=Ðð 
Ò	˜vÒ1ÜÐDÓEÐEàˆ=Ðr   c               ó    € V ^8„  d   QhRRRR/# )r   Úqzfloat | Iterable[float]r   z
np.ndarrayr   )r   s   "r   r   r   S  s   € ÷ ñ Ð2ð °zñ r   c                ó   € \         P                  ! V 4      pRpVP                  ^ 8X  d    ^ Tu;8:  d   ^8:  g   M \        V4      h V# \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   \        V4      hV# )a©  
Validate percentiles (used by describe and quantile).

This function checks if the given float or iterable of floats is a valid percentile
otherwise raises a ValueError.

Parameters
----------
q: float or iterable of floats
    A single percentile or an iterable of percentiles.

Returns
-------
ndarray
    An ndarray of the percentiles if valid.

Raises
------
ValueError if percentiles are not in given interval([0, 1]).
z0percentiles should all be in the interval [0, 1]c              3  óN   "  € T F  p^ Tu;8*  ;'       d    ^8*  Mu x € K  	  R# 5i)é    Nr   )Ú.0Úqss   & r   Ú	<genexpr>Ú&validate_percentile.<locals>.<genexpr>o  s   é € Ð.© "��b—”˜A—‘«ùs   ‚%•%FT)r^   ÚasarrayÚndimr   Úall)rk   Úq_arrÚmsgs   &  r   Úvalidate_percentilerx   S  sv   € ô* �JŠJ�q‹M€Eð =€CØ‡z�z�Q„Ø�EŽ˜QŽÜ˜S“/Ð!ð ð €L÷ ‹SÑ.©Ó.�S�SŠSÑ.©Ó.×.Ò.Ü˜‹oÐØ€Lr   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	ascendingr   r   r   )r   s   "r   r   r   u  s   € × <Ñ < (Ð <¨xÑ <r   c                ó   € R # ©Nr   ©rz   s   &r   Úvalidate_ascendingr~   t  s   € Ù9<r   c               ó    € V ^8„  d   QhRRRR/# )r   rz   zSequence[BoolishT]r   zlist[BoolishT]r   )r   s   "r   r   r   y  s   € × LÑ LÐ"4Ð L¸Ñ Lr   c                ó   € R # r|   r   r}   s   &r   r~   r~   x  s   € ÙILr   c               ó    € V ^8„  d   QhRRRR/# )r   rz   zbool | int | Sequence[BoolishT]r   zbool | int | list[BoolishT]r   )r   s   "r   r   r   |  s    € ÷ Tñ TØ.ðTà ñTr   c                ó˜   € RRRR/p\        V \        4      '       g   \        V R3/ VB # V  Uu. uF  p\        VR3/ VB NK  	  up# u upi )z8Validate ``ascending`` kwargs for ``sort_index`` method.rN   FrP   Trz   )rS   r   rX   )rz   r3   Úitems   &  r   r~   r~   |  sV   € ð ˜e ]°DÐ9€FÜ�i¤×*Ò*Ü" 9¨kÑD¸VÑDÐDáIRÓSÉÀÔ  kÑ<°VÔ<ÉÑSÐSùÒSs   ®Ac               ó    € V ^8„  d   QhRRRR/# )r   Úclosedú
str | Noner   útuple[bool, bool]r   )r   s   "r   r   r   ‡  s   € ÷ %ñ %˜zð %Ð.?ñ %r   c                óf   € RpRpV f   RpRpW3# V R8X  d   RpW3# V R8X  d   RpW3# \        R4      h)zõ
Check that the `closed` argument is among [None, "left", "right"]

Parameters
----------
closed : {None, "left", "right"}

Returns
-------
left_closed : bool
right_closed : bool

Raises
------
ValueError : if argument is not among valid values
FTÚleftÚrightz/Closed has to be either 'left', 'right' or None)r   )r…   Úleft_closedÚright_closeds   &  r   Úvalidate_endpointsr�   ‡  sj   € ð" €KØ€Là‚~ØˆØˆð Ð$Ð$ð 
�6Ô	Øˆð Ð$Ð$ð 
�7Ô	Øˆð Ð$Ð$ô ÐJÓKÐKr   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	inclusiver†   r   r‡   r   )r   s   "r   r   r   ¨  s   € ÷  ñ   *ð  Ð1Bñ  r   c                ó†   € Rp\        V \        4      '       d   RRRRRR	RR
/P                  V 4      pVf   \        R4      hV# )a  
Check that the `inclusive` argument is among {"both", "neither", "left", "right"}.

Parameters
----------
inclusive : {"both", "neither", "left", "right"}

Returns
-------
left_right_inclusive : tuple[bool, bool]

Raises
------
ValueError : if argument is not among valid values
NÚbothr‰   rŠ   Úneitherz?Inclusive has to be either 'both', 'neither', 'left' or 'right')TT©TF)FT)FF)rS   rM   Úgetr   )r�   Úleft_right_inclusives   & r   Úvalidate_inclusiver–   ¨  s`   € ð  6:Ðä�)œS×!Ò!à�LØ�MØ�]Ø�~ð	 
÷
 ‰#ˆi‹.ð 	ð Ò#ÜØMó
ð 	
ð  Ðr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚlocrT   Úlengthr   r   )r   s   "r   r   r   Ê  s!   € ÷ ñ ˜Sð ¨#ð °#ñ r   c                ó¬   € \        V 4      '       g   \        RV RV 24      hV ^ 8  d	   W,          p ^ T u;8:  d   V8:  g   M \        RV RV 24      hV # )z¬
Check that we have an integer between -length and length, inclusive.

Standardize negative loc to within [0, length].

The exceptions we raise on failure match np.insert.
z loc must be an integer between -z and )r
   r   Ú
IndexError)r˜   r™   s   &&r   Úvalidate_insert_locrœ   Ê  s_   € ô �c�?Š?ÜÐ:¸6¸(À%ÈÀxÐPÓQÐQà
ˆQ„wØ�ˆØ�Ö�vÖÜÐ;¸F¸8À5ÈÈÐQÓRÐRØ€Jr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   Ü  s   € ÷ ñ ¨$ñ r   c                ó^   € V \         P                  Jd   V R9  d   \        RV  R24      hR# R# )Únumpy_nullablezdtype_backend z= is invalid, only 'numpy_nullable' and 'pyarrow' are allowed.N)rŸ   Úpyarrow)r   r\   r   )Údtype_backends   &r   Úcheck_dtype_backendr¢   Ü  s?   € ØœCŸN™NÓ*ØÐ =Ô=ÜØ   ð 0)ð *óð ñ >ñ +r   r“   )T)%Ú__doc__Ú
__future__r   Úcollections.abcr   r   Útypingr   r   Únumpyr^   Úpandas._libsr   Úpandas._libs.missingr   Úpandas.core.dtypes.commonr	   r
   rO   rT   r   r   r$   r,   r4   r=   rB   rI   rX   r`   ri   rx   r~   r�   r–   rœ   r¢   r   r   r   Ú<module>r«      s¿   ðñõ
 #÷÷ó
 å Ý #÷ñ
 �:˜t SÓ)€Ù�~ t¨S°$Ó7€õ
õ(#õL&:õR
Uõ8õ670÷t*õZY÷6$õNðB 
Ü <ó 
Ø <ð 
Ü Ló 
Ø LõTõ%õB õD÷$r   