ó
    wñ:inc  ã                  óL  • % S r SSKJr  SSKJrJr  SSKrSSKJrJ	r	J
r
JrJrJr  SSKrSSKJrJr  SSKJr  \(       a  SSKJrJr   " S	 S
\5      r " S S\5      r0 rS\S'   0 rS\S'   0 rS\S'   S/rS\S'    " S S\\5      r S9S jr!S:S;S jjr"S<S jr#S=S>S jjr$S:S?S jjr%S@S jr& " S S5      r' " S  S!\\   5      r(S"r)S#r*S$r+S%r,\(" \"\)5      q-\(" \#\*5      q.\(" \%\,5      r/\(" \$\+5      r0\'" \5      r1 " S& S'\5      r2   SA           SBS( jjq3   SC         SDS) jjr4SES* jr5SFS+ jr6SGS, jr7SHS- jr8SHS. jr9SIS/ jr:SGS0 jr;SJS1 jr<SKSLS2 jjr=\SMS3 j5       r>SNS4 jr?SOS5 jr@SOS6 jrASPS7 jrB\?" \C5      rD\?" \E5      rF\?" \G5      rH\?" \I5      rJ\@" \I\K45      rLSQS8 jrMg)Raò  
The config module holds package-wide configurables and provides
a uniform API for working with them.

Overview
========

This module supports the following requirements:
- options are referenced using keys in dot.notation, e.g. "x.y.option - z".
- keys are case-insensitive.
- functions should accept partial/regex keys, when unambiguous.
- options can be registered by modules at import time.
- options can be registered at init-time (via core.config_init)
- options have a default value, and (optionally) a description and
  validation function associated with them.
- options can be deprecated, in which case referencing them
  should produce a warning.
- deprecated options can optionally be rerouted to a replacement
  so that accessing a deprecated option reroutes to a differently
  named option.
- options can be reset to their default value.
- all option can be reset to their default value at once.
- all options in a certain sub - namespace can be reset at once.
- the user can set / get / reset or ask for the description of an option.
- a developer can register and mark an option as deprecated.
- you can register a callback to be invoked when the option value
  is set or reset. Changing the stored value is considered misuse, but
  is not verboten.

Implementation
==============

- Data is stored using nested dictionaries, and should be accessed
  through the provided API.

- "Registered options" and "Deprecated options" have metadata associated
  with them, which are stored in auxiliary dictionaries keyed on the
  fully-qualified key, e.g. "x.y.z.option".

- the config_init module is imported by the package's __init__.py file.
  placing any register_option() calls there will ensure those options
  are available as soon as pandas is loaded. If you use register_option
  in a module, it will only be available after that module is imported,
  which you should be aware of.

- `config_prefix` is a context_manager (for use with the `with` keyword)
  which can save developers some typing, see the docstring.

é    )Úannotations)ÚContextDecoratorÚcontextmanagerN)ÚTYPE_CHECKINGÚAnyÚCallableÚGenericÚ
NamedTupleÚcast)ÚFÚT)Úfind_stack_level)Ú	GeneratorÚIterablec                  ó>   • \ rS rSr% S\S'   S\S'   S\S'   S\S'   Srg	)
ÚDeprecatedOptionéQ   ÚstrÚkeyú
str | NoneÚmsgÚrkeyÚremoval_ver© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__Ú__static_attributes__r   ó    ÚX/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/pandas/_config/config.pyr   r   Q   s   ‡ Ø	ƒHØ	ƒOØ
ÓØÖr"   r   c                  óH   • \ rS rSr% S\S'   S\S'   S\S'   S\S'   S	\S
'   Srg)ÚRegisteredOptionéX   r   r   ÚobjectÚdefvalÚdocúCallable[[object], Any] | NoneÚ	validatorúCallable[[str], Any] | NoneÚcbr   Nr   r   r"   r#   r%   r%   X   s   ‡ Ø	ƒHØƒNØ	ƒHØ-Ó-Ø#Ö#r"   r%   zdict[str, DeprecatedOption]Ú_deprecated_optionszdict[str, RegisteredOption]Ú_registered_optionsúdict[str, Any]Ú_global_configÚallú	list[str]Ú_reserved_keysc                  ó   • \ rS rSrSrSrg)ÚOptionErrorém   z»
Exception raised for pandas.options.

Backwards compatible with KeyError checks.

Examples
--------
>>> pd.options.context
Traceback (most recent call last):
OptionError: No such option
r   N)r   r   r   r   Ú__doc__r!   r   r"   r#   r6   r6   m   s   † ô
r"   r6   c                ó  • [        U 5      n[        U5      S:X  a)  U(       d  [        U 5        [        S[	        U 5       35      e[        U5      S:”  a  [        S5      eUS   nU(       d  [        U5        [        U5      nU$ )Nr   zNo such keys(s): é   zPattern matched multiple keys)Ú_select_optionsÚlenÚ_warn_if_deprecatedr6   ÚreprÚ_translate_key)ÚpatÚsilentÚkeysr   s       r#   Ú_get_single_keyrC      ss   € Ü˜3Ó€DÜ
ˆ4ƒy�Aƒ~ÞÜ Ô$ÜÐ-¬d°3«i¨[Ð9Ó:Ð:Ü
ˆ4ƒy�1ƒ}ÜÐ9Ó:Ð:Ø
ˆq‰'€CæÜ˜CÔ ä
˜Ó
€Cà€Jr"   c                ó:   • [        X5      n[        U5      u  p4X4   $ ©N)rC   Ú	_get_root)r@   rA   r   ÚrootÚks        r#   Ú_get_optionrI   ‘   s    € Ü
˜#Ó
&€Cô ˜‹n�G€DØ‰7€Nr"   c                 ó   • [        U 5      nU(       a	  US-  S:w  a  [        S5      eUR                  SS5      nU(       a1  [        [	        UR                  5       5      5      n[        SU S35      e[        U S S S2   U SS S2   5       H°  u  pV[        XS5      n[        U5      nU(       a"  UR                  (       a  UR                  U5        [        U5      u  pšXiU
'   UR                  (       d  Mh  U(       a0  [        R                  " S	S
9   UR                  U5        S S S 5        MŸ  UR                  U5        M²     g ! , (       d  f       MÄ  = f)Né   r   z4Must provide an even number of non-keyword argumentsrA   Fz2_set_option() got an unexpected keyword argument "Ú"r:   T)Úrecord)r<   Ú
ValueErrorÚpopÚnextÚiterrB   Ú	TypeErrorÚziprC   Ú_get_registered_optionr+   rF   r-   ÚwarningsÚcatch_warnings)ÚargsÚkwargsÚnargsrA   ÚkwargrH   Úvr   ÚorG   Úk_roots              r#   Ú_set_optionr^   ™   s  € ä�‹I€EÞ�E˜A‘I “NÜÐOÓPÐPð �Z‰Z˜ %Ó(€FæÜ”T˜&Ÿ+™+›-Ó(Ó)ˆÜÐLÈUÈGÐSTÐUÓVÐVä�D™˜1˜‘I˜t A D q D™zÖ*‰ˆÜ˜aÓ(ˆä" 3Ó'ˆÞ�——Ø�K‰K˜ŒNô ! “~‰ˆØˆV‰à�4�4‰4ÞÜ×,Ò,°DÓ9Ø—D‘D˜”I÷ :Ñ9ð —‘�S–	ò! +÷ :Ö9ús   ÄD>Ä>
E	c                óÖ   • [        U 5      n[        U5      S:X  a  [        S5      eSR                  U Vs/ s H  n[	        U5      PM     sn5      nU(       a  [        U5        g U$ s  snf )Nr   úNo such keys(s)Ú
)r;   r<   r6   ÚjoinÚ_build_option_descriptionÚprint)r@   Ú_print_descrB   rH   Úss        r#   Ú_describe_optionrg   ¹   s]   € Ü˜3Ó€DÜ
ˆ4ƒy�Aƒ~ÜÐ+Ó,Ð,à�	‰	¹Ó>º°AÔ,¨QÖ/¹Ñ>Ó?€AæÜˆaŒØØ€Hùò ?s   µA&c                óö   • [        U 5      n[        U5      S:X  a  [        S5      e[        U5      S:”  a   [        U 5      S:  a  U S:w  a  [        S5      eU H  n[	        U[
        U   R                  US9  M!     g )Nr   r`   r:   é   r2   z’You must specify at least 4 characters when resetting multiple keys, use the special keyword "all" to reset all the options to their default value©rA   )r;   r<   r6   rN   r^   r/   r(   )r@   rA   rB   rH   s       r#   Ú_reset_optionrk   Æ   su   € Ü˜3Ó€Dä
ˆ4ƒy�Aƒ~ÜÐ+Ó,Ð,ä
ˆ4ƒy�1ƒ}œ˜S› A›¨#°«,ÜðDó
ð 	
ó ˆÜ�AÔ*¨1Ñ-×4Ñ4¸VÔDò r"   c                ó@   • [        U SS9n[        U5      R                  $ ©NTrj   )rC   rT   r(   )r@   r   s     r#   Úget_default_valrn   ×   s   € Ü
˜# dÑ
+€CÜ! #Ó&×-Ñ-Ð-r"   c                  óP   • \ rS rSr% SrS\S'   SSS jjrSS jrSS jrSS jr	S	r
g
)ÚDictWrapperéÜ   z/provide attribute-style access to a nested dictr0   Údc                ó`   • [         R                  U SU5        [         R                  U SU5        g )Nrr   Úprefix)r'   Ú__setattr__)Úselfrr   rt   s      r#   Ú__init__ÚDictWrapper.__init__á   s&   € Ü×Ñ˜4  aÔ(Ü×Ñ˜4 ¨6Õ2r"   c                óÞ   • [         R                  U S5      nU(       a  US-  nX1-  nXR                  ;   a.  [        U R                  U   [        5      (       d  [        X25        g [        S5      e)Nrt   Ú.z.You can only set the value of existing options)r'   Ú__getattribute__rr   Ú
isinstanceÚdictr^   r6   )rv   r   Úvalrt   s       r#   ru   ÚDictWrapper.__setattr__å   sZ   € Ü×(Ñ(¨¨xÓ8ˆÞØ�c‰MˆFØ‰ˆð —&‘&‹=¤¨D¯F©F°3©K¼×!>Ñ!>Ü˜Õ$äÐNÓOÐOr"   c                ó  • [         R                  U S5      nU(       a  US-  nX!-  n [         R                  U S5      U   n[	        U[
        5      (       a  [        X25      $ [        U5      $ ! [         a  n[        S5      UeS nAff = f)Nrt   rz   rr   zNo such option)r'   r{   ÚKeyErrorr6   r|   r}   rp   rI   )rv   r   rt   r[   Úerrs        r#   Ú__getattr__ÚDictWrapper.__getattr__ñ   sˆ   € Ü×(Ñ(¨¨xÓ8ˆÞØ�c‰MˆFØ‰ˆð	9Ü×'Ñ'¨¨cÓ2°3Ñ7ˆAô �aœ×ÑÜ˜qÓ)Ð)ä˜vÓ&Ð&øô ó 	9ÜÐ.Ó/°SÐ8ûð	9ús   ¨A, Á,
BÁ6BÂBc                óH   • [        U R                  R                  5       5      $ rE   )Úlistrr   rB   )rv   s    r#   Ú__dir__ÚDictWrapper.__dir__ÿ   s   € Ü�D—F‘F—K‘K“MÓ"Ð"r"   r   N)Ú )rr   r0   rt   r   ÚreturnÚNone)r   r   r~   r   rŠ   r‹   ©r   r   )rŠ   r3   )r   r   r   r   r8   r    rw   ru   rƒ   r‡   r!   r   r"   r#   rp   rp   Ü   s    ‡ Ù9àÓö3ô
Pô'÷#r"   rp   c                  ó<   • \ rS rSrSS jrSS jr\S	S j5       rSrg)
ÚCallableDynamicDoci  c                ó   • X l         Xl        g rE   ©Ú__doc_tmpl__Ú__func__)rv   ÚfuncÚdoc_tmpls      r#   rw   ÚCallableDynamicDoc.__init__  s   € Ø$ÔØ�r"   c                ó&   • U R                   " U0 UD6$ rE   )r’   )rv   rW   Úkwdss      r#   Ú__call__ÚCallableDynamicDoc.__call__  s   € Ø�}Š}˜dÐ+ dÑ+Ð+r"   c                ó”   • [        SSS9n[        [        [        R	                  5       5      5      nU R
                  R                  XS9$ )Nr2   F)re   )Ú	opts_descÚ	opts_list)rg   Úpp_options_listr†   r/   rB   r‘   Úformat)rv   r›   rœ   s      r#   r8   ÚCallableDynamicDoc.__doc__  sA   € ä$ U¸Ñ>ˆ	Ü#¤DÔ)<×)AÑ)AÓ)CÓ$DÓEˆ	Ø× Ñ ×'Ñ'°)Ð'ÐQÐQr"   r�   N)r“   zCallable[..., T]r”   r   rŠ   r‹   )rŠ   r   )rŠ   r   )	r   r   r   r   rw   r˜   Úpropertyr8   r!   r   r"   r#   rŽ   rŽ     s"   † ôô,ð óRó óRr"   rŽ   aÓ  
get_option(pat)

Retrieves the value of the specified option.

Available options:

{opts_list}

Parameters
----------
pat : str
    Regexp which should match a single option.
    Note: partial matches are supported for convenience, but unless you use the
    full option name (e.g. x.y.z.option_name), your code may break in future
    versions if new options with similar names are introduced.

Returns
-------
result : the value of the option

Raises
------
OptionError : if no such option exists

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.get_option('display.max_columns')  # doctest: +SKIP
4
aŒ  
set_option(pat, value)

Sets the value of the specified option.

Available options:

{opts_list}

Parameters
----------
pat : str
    Regexp which should match a single option.
    Note: partial matches are supported for convenience, but unless you use the
    full option name (e.g. x.y.z.option_name), your code may break in future
    versions if new options with similar names are introduced.
value : object
    New value of option.

Returns
-------
None

Raises
------
OptionError if no such option exists

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.set_option('display.max_columns', 4)
>>> df = pd.DataFrame([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
>>> df
   0  1  ...  3   4
0  1  2  ...  4   5
1  6  7  ...  9  10
[2 rows x 5 columns]
>>> pd.reset_option('display.max_columns')
a�  
describe_option(pat, _print_desc=False)

Prints the description for one or more registered options.

Call with no arguments to get a listing for all registered options.

Available options:

{opts_list}

Parameters
----------
pat : str
    Regexp pattern. All matching keys will have their description displayed.
_print_desc : bool, default True
    If True (default) the description(s) will be printed to stdout.
    Otherwise, the description(s) will be returned as a unicode string
    (for testing).

Returns
-------
None by default, the description(s) as a unicode string if _print_desc
is False

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.describe_option('display.max_columns')  # doctest: +SKIP
display.max_columns : int
    If max_cols is exceeded, switch to truncate view...
aÍ  
reset_option(pat)

Reset one or more options to their default value.

Pass "all" as argument to reset all options.

Available options:

{opts_list}

Parameters
----------
pat : str/regex
    If specified only options matching `prefix*` will be reset.
    Note: partial matches are supported for convenience, but unless you
    use the full option name (e.g. x.y.z.option_name), your code may break
    in future versions if new options with similar names are introduced.

Returns
-------
None

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.reset_option('display.max_columns')  # doctest: +SKIP
c                  ó6   • \ rS rSrSrSS jrSS jrSS jrSrg)	Úoption_contextiÊ  a&  
Context manager to temporarily set options in the `with` statement context.

You need to invoke as ``option_context(pat, val, [(pat, val), ...])``.

Examples
--------
>>> from pandas import option_context
>>> with option_context('display.max_rows', 10, 'display.max_columns', 5):
...     pass
c           	     ó¨   • [        U5      S-  S:w  d  [        U5      S:  a  [        S5      e[        [        US S S2   USS S2   5      5      U l        g )NrK   r   z>Need to invoke as option_context(pat, val, [(pat, val), ...]).r:   )r<   rN   r†   rS   Úops)rv   rW   s     r#   rw   Úoption_context.__init__×  sS   € Üˆt‹9�q‰=˜AÓ¤ T£¨Q£ÜØPóð ô œ˜D¡ 1 ™I t¨A¨D¨q¨D¡zÓ2Ó3ˆ�r"   c                ó°   • U R                    VVs/ s H  u  pU[        U5      4PM     snnU l        U R                    H  u  p[        XSS9  M     g s  snnf rm   )r¤   rI   Úundor^   )rv   r@   r~   s      r#   Ú	__enter__Úoption_context.__enter__ß  sH   € Ø=A¿XºXÔFºX±°�cœ; sÓ+Ó,¹XÒFˆŒ	àŸœ‰HˆCÜ˜¨Ô.ò !ùó Gs   �Ac                óf   • U R                   (       a   U R                    H  u  p#[        X#SS9  M     g g rm   )r§   r^   )rv   rW   r@   r~   s       r#   Ú__exit__Úoption_context.__exit__å  s(   € Ø�9�9Ø ŸIœI‘�Ü˜C¨TÔ2ò &ð r"   )r¤   r§   N©rŠ   r‹   )	r   r   r   r   r8   rw   r¨   r«   r!   r   r"   r#   r¢   r¢   Ê  s   † ñ
ô4ô/÷3r"   r¢   c           
     ó,  • SSK nSSKnU R                  5       n U [        ;   a  [	        SU  S35      eU [
        ;   a  [	        SU  S35      eU(       a  U" U5        U R                  S5      nU Ha  n[        R                  " SUR                  -   S-   U5      (       d  [        U S	35      eUR                  U5      (       d  MU  [        U S
35      e   [        n	Sn
[        USS 5       HQ  u  p¼[        U	[        5      (       d*  [	        U
R!                  SR#                  USU 5      S95      eXÉ;  a  0 Xœ'   Xœ   n	MS     [        U	[        5      (       d*  [	        U
R!                  SR#                  USS 5      S95      eXUS   '   [%        XX#US9[        U '   g)a~  
Register an option in the package-wide pandas config object

Parameters
----------
key : str
    Fully-qualified key, e.g. "x.y.option - z".
defval : object
    Default value of the option.
doc : str
    Description of the option.
validator : Callable, optional
    Function of a single argument, should raise `ValueError` if
    called with a value which is not a legal value for the option.
cb
    a function of a single argument "key", which is called
    immediately after an option value is set/reset. key is
    the full name of the option.

Raises
------
ValueError if `validator` is specified and `defval` is not a valid value.

r   NúOption 'z' has already been registeredz' is a reserved keyrz   Ú^Ú$z is not a valid identifierz is a python keywordz5Path prefix to option '{option}' is already an optionéÿÿÿÿ)Úoption)r   r(   r)   r+   r-   )ÚkeywordÚtokenizeÚlowerr/   r6   r4   ÚsplitÚreÚmatchÚNamerN   Ú	iskeywordr1   Ú	enumerater|   r}   rž   rb   r%   )r   r(   r)   r+   r-   r´   rµ   ÚpathrH   Úcursorr   ÚiÚps                r#   Úregister_optionrÁ   ë  s�  € ó> Ûà
�)‰)‹+€Cà
Ô!Ó!Ü˜H S EÐ)FÐGÓHÐHØ
ŒnÓÜ˜H S EÐ)<Ð=Ó>Ð>ö Ù�&Ôð �9‰9�S‹>€DãˆÜ�xŠx˜˜hŸm™mÑ+¨cÑ1°1×5Ñ5Ü ˜sÐ"<Ð=Ó>Ð>Ø×Ñ˜Q×ÓÜ ˜sÐ"6Ð7Ó8Ð8ñ	 ô €FØ
A€Cä˜$˜s ˜)Ö$‰ˆÜ˜&¤$×'Ñ'Ü˜cŸj™j°·±¸¸b¸q¸Ó0B˜jÐCÓDÐDØ‹?ØˆF‰IØ‘Šñ %ô �fœd×#Ñ#Ü˜#Ÿ*™*¨C¯H©H°T¸#¸2°YÓ,?˜*Ð@ÓAÐAàˆ4�‰8Ñô  0Ø CÀñ Ô˜Òr"   c                ó|   • U R                  5       n U [        ;   a  [        SU  S35      e[        XX#5      [        U '   g)a¡  
Mark option `key` as deprecated, if code attempts to access this option,
a warning will be produced, using `msg` if given, or a default message
if not.
if `rkey` is given, any access to the key will be re-routed to `rkey`.

Neither the existence of `key` nor that if `rkey` is checked. If they
do not exist, any subsequence access will fail as usual, after the
deprecation warning is given.

Parameters
----------
key : str
    Name of the option to be deprecated.
    must be a fully-qualified option name (e.g "x.y.z.rkey").
msg : str, optional
    Warning message to output when the key is referenced.
    if no message is given a default message will be emitted.
rkey : str, optional
    Name of an option to reroute access to.
    If specified, any referenced `key` will be
    re-routed to `rkey` including set/get/reset.
    rkey must be a fully-qualified option name (e.g "x.y.z.rkey").
    used by the default message if no `msg` is specified.
removal_ver : str, optional
    Specifies the version in which this option will
    be removed. used by the default message if no `msg` is specified.

Raises
------
OptionError
    If the specified key has already been deprecated.
r¯   z)' has already been defined as deprecated.N)r¶   r.   r6   r   )r   r   r   r   s       r#   Údeprecate_optionrÃ   6  s@   € ðN �)‰)‹+€Cà
Ô!Ó!Ü˜H S EÐ)RÐSÓTÐTä/°¸$ÓLÔ˜Òr"   c                óî   • U [         ;   a  U /$ [        [         R                  5       5      nU S:X  a  U$ U Vs/ s H1  n[        R                  " X[        R
                  5      (       d  M/  UPM3     sn$ s  snf )zV
returns a list of keys matching `pat`

if pat=="all", returns all registered options
r2   )r/   ÚsortedrB   r¸   ÚsearchÚI)r@   rB   rH   s      r#   r;   r;   i  s_   € ð Ô!Ó!Øˆuˆô Ô%×*Ñ*Ó,Ó-€DØ
ˆeƒ|ØˆáÓ7’t�!œrŸyšy¨´·±×6�A‘tÑ7Ð7ùÒ7s   ·.A2Á)A2c                ó\   • U R                  S5      n[        nUS S  H  nX#   nM	     X!S   4$ )Nrz   r²   )r·   r1   )r   r½   r¾   rÀ   s       r#   rF   rF   {  s8   € Ø�9‰9�S‹>€DÜ€FØ�#�2‹YˆØ‘Šñ à˜‘8ÐÐr"   c                ó4   • U R                  5       n U [        ;   $ )z4Returns True if the given option has been deprecated)r¶   r.   ©r   s    r#   Ú_is_deprecatedrË   ƒ  s   € à
�)‰)‹+€CØÔ%Ñ%Ð%r"   c                ó:   •  [         U    nU$ ! [         a     gf = f)z�
Retrieves the metadata for a deprecated option, if `key` is deprecated.

Returns
-------
DeprecatedOption (namedtuple) if key is deprecated, None otherwise
N)r.   r�   ©r   rr   s     r#   Ú_get_deprecated_optionrÎ   ‰  s,   € ðÜ Ñ$ˆð ˆøô ó Ùðús   ‚	 �
™c                ó,   • [         R                  U 5      $ )z”
Retrieves the option metadata if `key` is a registered option.

Returns
-------
RegisteredOption (namedtuple) if key is deprecated, None otherwise
)r/   ÚgetrÊ   s    r#   rT   rT   ™  s   € ô ×"Ñ" 3Ó'Ð'r"   c                óT   • [        U 5      nU(       a  UR                  =(       d    U $ U $ )zv
if key id deprecated and a replacement key defined, will return the
replacement key, otherwise returns `key` as - is
)rÎ   r   rÍ   s     r#   r?   r?   ¤  s$   € ô
 	˜sÓ#€AÞØ�v‰v�}˜Ðàˆ
r"   c                ó�  • [        U 5      nU(       a´  UR                  (       a-  [        R                  " UR                  [        [        5       S9  gSU  S3nUR                  (       a  USUR                   3-  nUR                  (       a  USUR                   S3-  nOUS-  n[        R                  " U[        [        5       S9  gg	)
z‹
Checks if `key` is a deprecated option and if so, prints a warning.

Returns
-------
bool - True if `key` is deprecated, False otherwise.
)Ú
stacklevelÚ'z' is deprecatedz and will be removed in z, please use 'z
' instead.z, please refrain from using it.TF)rÎ   r   rU   ÚwarnÚFutureWarningr   r   r   )r   rr   r   s      r#   r=   r=   °  s©   € ô 	˜sÓ#€AÞØ�5�5Ü�MŠMØ—‘ÜÜ+Ó-òð ð �c�U˜/Ð*ˆCØ�}�}ØÐ1°!·-±-°ÐAÑA�Ø�v�vØ˜¨¯© x¨zÐ:Ñ:‘àÐ8Ñ8�ä�MŠM˜#œ}Ô9IÓ9KÒLØØr"   c                óŒ  • [        U 5      n[        U 5      nU  S3nUR                  (       a<  USR                  UR                  R	                  5       R                  S5      5      -  nOUS-  nU(       a   USUR                   S[        U S5       S3-  nU(       a(  UR                  =(       d    SnUS	-  nUS
U S3-  nUS-  nU$ )zCBuilds a formatted description of a registered option and prints itÚ ra   zNo description available.z
    [default: z] [currently: TÚ]r‰   z
    (Deprecatedz, use `z
` instead.Ú))	rT   rÎ   r)   rb   Ústripr·   r(   rI   r   )rH   r\   rr   rf   r   s        r#   rc   rc   Î  sÀ   € ä˜qÓ!€AÜ˜qÓ!€Aàˆ#ˆQˆ€Aà‡u‡uØ	ˆT�Y‰Y�q—u‘u—{‘{“}×*Ñ*¨4Ó0Ó1Ñ1‰à	Ð(Ñ(ˆæØ	Ð §¡˜z¨¼ÀAÀtÓ8LÐ7MÈQÐOÑOˆæØ�v‰v�|˜ˆØ	Ð Ñ ˆØ	ˆw�t�f˜JÐ'Ñ'ˆØ	ˆS‰ˆà€Hr"   c                ó  ^^• SSK Jn  SSKJm  SUU4S jjn/ n[	        U 5       Vs/ s H  ofR                  S5      S:  d  M  UPM     nnU(       a  XT" SU5      -  nU  Vs/ s H  ofR                  S5      S:¼  d  M  UPM     n nU" [	        U 5      S 5       H8  u  p‰[        U	5       Vs/ s H  of[        U5      S-   S	 PM     n
nXT" XŠ5      -  nM:     S
R                  U5      nU(       a  [        U5        g	U$ s  snf s  snf s  snf )z@Builds a concise listing of available options, grouped by prefixr   )Úgroupby)Úwrapc                ó¢   >• U (       a  SU -   S-   OSnT" SR                  U5      TUSSS9nU(       a  US   (       a  U (       a  US   S	-   US'   U$ )
Nz- z.[r‰   z, z  F)Úinitial_indentÚsubsequent_indentÚbreak_long_wordsr²   rÙ   )rb   )ÚnameÚksÚpfxÚlsÚwidthrÞ   s       €€r#   ÚppÚpp_options_list.<locals>.ppë  sY   ø€ Þ$(ˆd�T‰k˜DÒ ¨bˆÙØ�I‰I�b‹MØØØ"Ø"ñ
ˆö �"�R—&žTØ˜‘V˜c‘\ˆBˆr‰FØˆ	r"   rz   r‰   c                ó*   • U S U R                  S5       $ ©Nrz   )Úrfind)Úxs    r#   Ú<lambda>Ú!pp_options_list.<locals>.<lambda>þ  s   € °°.°A·G±G¸C³LÑ0Ar"   r:   Nra   )rã   r   rä   úIterable[str]rŠ   r3   )
Ú	itertoolsrÝ   ÚtextwraprÞ   rÅ   Úfindr†   r<   rb   rd   )rB   rç   Ú_printrÝ   rè   ræ   rí   ÚsinglesrH   Úgrä   rf   rÞ   s    `          @r#   r�   r�   æ  sé   ù€ å!Ý÷ð ð €BÜ  œ,Ó:š,�Q¯&©&°«+¸©/�q™,€GÐ:ÞØ
ˆb��W‹oÑˆÙÓ0’t�!Ÿv™v c›{¨aÑ/�A‘t€DÐ0áœ˜t›Ñ&AÖB‰ˆÜ'+¨A¤wÓ/¢w !”�A“˜‘
�‹o¡wˆÐ/Ø
ˆb�‹i‰Šñ Cð 	�	‰	�"‹€AÞÜˆa�àˆùò ;ùò 1ùò 0s   §C:ÁC:Á!C?Á=C?Â*Dc              #  ó¶   ^ #   • SU 4S jjn[         n[        n[        nU" [        5      qU" [        5      qU" [         5      q  Sv •  UqUqUq g! UqUqUq f = f7f)a~  
contextmanager for multiple invocations of API with a common prefix

supported API functions: (register / get / set )__option

Warning: This is not thread - safe, and won't work properly if you import
the API functions into your module using the "from x import y" construct.

Example
-------
import pandas._config.config as cf
with cf.config_prefix("display.font"):
    cf.register_option("color", "red")
    cf.register_option("size", " 5 pt")
    cf.set_option(size, " 6 pt")
    cf.get_option(size)
    ...

    etc'

will register options "display.font.color", "display.font.size", set the
value of "display.font.size"... and so on.
c                ó8   >^ • SU U4S jjn[        [        U5      $ )Nc                ó*   >• T SU  3nT" U/UQ70 UD6$ rë   r   )r   rW   r—   Úpkeyr“   rt   s       €€r#   ÚinnerÚ*config_prefix.<locals>.wrap.<locals>.inner+  s(   ø€ Ø�X˜Q˜s˜eÐ$ˆDÙ˜Ð,˜tÒ, tÑ,Ð,r"   rŒ   )r   r   )r“   rû   rt   s   ` €r#   rÞ   Úconfig_prefix.<locals>.wrap*  s   ù€ ÷	-ð 	-ô ”A�u‹~Ðr"   N)r“   r   rŠ   r   )rÁ   Ú
get_optionÚ
set_option)rt   rÞ   Ú_register_optionrI   r^   s   `    r#   Úconfig_prefixr    sd   øé € ÷<ô 'ÐÜ€KÜ€KÙ”jÓ!€JÙ”jÓ!€JÙœ?Ó+€Oð+Ûà ˆ
Ø ˆ
Ø*‰øð !ˆ
Ø ˆ
Ø*‰üs   ƒ?AÁA ÁAÁAÁAc                ó   ^ • SU 4S jjnU$ )zã

Parameters
----------
`_type` - a type to be compared against (e.g. type(x) == `_type`)

Returns
-------
validator - a function of a single argument x , which raises
            ValueError if type(x) is not equal to `_type`

c                óB   >• [        U 5      T:w  a  [        ST S35      eg )NzValue must have type 'rÔ   )ÚtyperN   )rí   Ú_types    €r#   rû   Úis_type_factory.<locals>.innerQ  s)   ø€ Ü�‹7�eÓÜÐ5°e°W¸AÐ>Ó?Ð?ð r"   r­   r   )r  rû   s   ` r#   Úis_type_factoryr  C  s   ø€ ÷@ð €Lr"   c                ó´   ^ ^• [        T [        [        45      (       a+  [        T 5      m SR                  [	        [
        T 5      5      mOST  S3mSU U4S jjnU$ )zÊ

Parameters
----------
`_type` - the type to be checked against

Returns
-------
validator - a function of a single argument x , which raises
            ValueError if x is not an instance of `_type`

Ú|rÔ   c                óD   >• [        U T5      (       d  [        ST 35      eg )NzValue must be an instance of )r|   rN   )rí   r  Ú	type_reprs    €€r#   rû   Ú"is_instance_factory.<locals>.innerk  s(   ø€ Ü˜!˜U×#Ñ#ÜÐ<¸Y¸KÐHÓIÐIð $r"   r­   )r|   Útupler†   rb   Úmapr   )r  rû   r  s   ` @r#   Úis_instance_factoryr  X  sS   ù€ ô �%œ%¤˜×'Ñ'Ü�e“ˆØ—H‘HœS¤ e›_Ó-‰	à˜�w˜a�Lˆ	÷Jð Jð €Lr"   c                óÄ   ^ ^• T  Vs/ s H  n[        U5      (       d  M  UPM     snmT  Vs/ s H  n[        U5      (       a  M  UPM     snm SUU 4S jjnU$ s  snf s  snf )Nc                óö   >^ • T T;  al  [        U 4S jT 5       5      (       dQ  T Vs/ s H  n[        U5      PM     nnSR                  U5      nSU 3n[        T5      (       a  US-  n[	        U5      eg g s  snf )Nc              3  ó2   >#   • U  H  o" T5      v •  M     g 7frE   r   )Ú.0Úcrí   s     €r#   Ú	<genexpr>Ú3is_one_of_factory.<locals>.inner.<locals>.<genexpr>x  s   øé € Ð/¢Y �q˜—t�t¢Yùs   ƒr	  zValue must be one of z or a callable)Úanyr   rb   r<   rN   )rí   ÚlvalÚuvalsÚ	pp_valuesr   Ú	callablesÚlegal_valuess   `    €€r#   rû   Ú is_one_of_factory.<locals>.innerv  sx   ù€ Ø�LÓ ÜÔ/¡YÓ/×/Ñ/Ù/;Ó<ª| tœ˜Tž©|�Ð<ØŸH™H U›O�	Ø-¨i¨[Ð9�Ü�y—>‘>ØÐ+Ñ+�CÜ  “oÐ%ð 0ð !ùâ<s   §A6r­   )Úcallable)r  r  rû   r  s   `  @r#   Úis_one_of_factoryr  r  sP   ù€ Ù(Ó8šL�q¬H°Q¯K—™LÑ8€IÙ+Ó?š|˜!´8¸A·;—A™|Ñ?€L÷&ð &ð €Lùò 9ùÚ?s   ‡AŸA¬AÁAc                ó\   • U c  g[        U [        5      (       a  U S:¼  a  gSn[        U5      e)zÎ
Verify that value is None or a positive int.

Parameters
----------
value : None or int
        The `value` to be checked.

Raises
------
ValueError
    When the value is not None or is a negative integer
Nr   z+Value must be a nonnegative integer or None)r|   ÚintrN   )Úvaluer   s     r#   Úis_nonnegative_intr#  ƒ  s2   € ð �}Øä	�Eœ3×	Ñ	Ø�A‹:Øà
7€CÜ
�S‹/Ðr"   c                ó:   • [        U 5      (       d  [        S5      eg)z›

Parameters
----------
`obj` - the object to be checked

Returns
-------
validator - returns True if object is callable
    raises ValueError otherwise.

zValue must be a callableT)r  rN   )Úobjs    r#   Úis_callabler&  ¥  s   € ô �C�=‰=ÜÐ3Ó4Ð4Ør"   )r@   r   rA   ÚboolrŠ   r   )F)r@   r   rA   r'  rŠ   r   r­   )r‰   T)r@   r   re   r'  rŠ   r   )r@   r   rA   r'  rŠ   r‹   )r@   r   )r‰   NN)r   r   r(   r'   r)   r   r+   r*   r-   r,   rŠ   r‹   )NNN)
r   r   r   r   r   r   r   r   rŠ   r‹   )r@   r   rŠ   r3   )r   r   rŠ   ztuple[dict[str, Any], str])r   r   rŠ   r'  rŒ   )r   r   rŠ   r   )rH   r   rŠ   r   )éP   F)rB   rð   rç   r!  rô   r'  )rt   r   rŠ   zGenerator[None, None, None])r  z	type[Any]rŠ   úCallable[[Any], None])rŠ   r)  )r"  r'   rŠ   r‹   )rŠ   r'  )Nr8   Ú
__future__r   Ú
contextlibr   r   r¸   Útypingr   r   r   r	   r
   r   rU   Úpandas._typingr   r   Úpandas.util._exceptionsr   Úcollections.abcr   r   r   r%   r.   r    r/   r1   r4   ÚAttributeErrorr�   r6   rC   rI   r^   rg   rk   rn   rp   rŽ   Ú_get_option_tmplÚ_set_option_tmplÚ_describe_option_tmplÚ_reset_option_tmplrþ   rÿ   Úreset_optionÚdescribe_optionÚoptionsr¢   rÁ   rÃ   r;   rF   rË   rÎ   rT   r?   r=   rc   r�   r  r  r  r  r#  r!  Úis_intr'  Úis_boolÚfloatÚis_floatr   Úis_strÚbytesÚis_textr&  r   r"   r#   Ú<module>r?     sp  ðò0õd #÷ó 
÷÷ ó ÷õ 5æ÷ô�zô ô$�zô $ð 46Ð Ð0Ó 5ð 46Ð Ð0Ó 5ð "$€�Ó #ð #˜G€�	Ó #ô�. (ô ô$ö$ôö@
öEô".÷
$#ñ $#ô`R˜ ™ô Rð %Ð ðN-Ð ð^&Ð ðP"Ð ñL   Ð-=Ó>€
Ù Ð-=Ó>€
Ù! -Ð1CÓD€Ù$Ð%5Ð7LÓM€Ù
�nÓ
%€ô3Ð%ô 3ðH Ø04Ø&*ðHØ	ðHàðHð 
ðHð .ð	Hð
 	$ðHð 
õHðZ ØØ"ð	,MØ	ð,Mà	ð,Mð ð,Mð ð	,Mð
 
õ,Môf8ô$ô&ôô (ô	ôô<ö0ðL ó/+ó ð/+ôlô*ô4ô"ñ6 
˜Ó	€Ù
˜$Ó
€Ù˜5Ó!€Ù	˜Ó	€Ù
˜s E˜lÓ
+€õr"   