§
    §éUg  ã                   óB   — d dl Z d dlZdgZ G d„ d¦  «        Zd„ Zd„ ZdS )é    NÚ
deprecatedc                   ó2   — e Zd ZdZd	d„Zd„ Zd„ Zd„ Zd„ ZdS )
r   a¥  Decorator to mark a function or class as deprecated.

    Issue a warning when the function is called/the class is instantiated and
    adds a warning to the docstring.

    The optional extra argument will be appended to the deprecation message
    and the docstring. Note: to use this with the default value for extra, put
    in an empty of parentheses:

    Examples
    --------
    >>> from sklearn.utils import deprecated
    >>> deprecated()
    <sklearn.utils.deprecation.deprecated object at ...>
    >>> @deprecated()
    ... def some_function(): pass

    Parameters
    ----------
    extra : str, default=''
          To be added to the deprecation messages.
    Ú c                 ó   — || _         d S )N)Úextra)Úselfr   s     úX/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/sklearn/utils/deprecation.pyÚ__init__zdeprecated.__init__"   s   € ØˆŒ
ˆ
ˆ
ó    c                 óÔ   — t          |t          ¦  «        r|                      |¦  «        S t          |t          ¦  «        r|                      |¦  «        S |                      |¦  «        S )zPCall method

        Parameters
        ----------
        obj : object
        )Ú
isinstanceÚtypeÚ_decorate_classÚpropertyÚ_decorate_propertyÚ_decorate_fun)r   Úobjs     r	   Ú__call__zdeprecated.__call__%   sf   € õ �c�4Ñ Ô ð 	+Ø×'Ò'¨Ñ,Ô,Ð,Ý˜�XÑ&Ô&ð 
	+ð ×*Ò*¨3Ñ/Ô/Ð/à×%Ò% cÑ*Ô*Ð*r   c                 óŠ   ‡‡— d|j         z  Š| j        r‰d| j        z  z  Š|j        Šˆˆfd„}||_        d|_         ‰|_        |S )NzClass %s is deprecatedú; %sc                 ó¢   •— t          j        ‰t          ¬¦  «         ‰t          j        u rt                               | ¦  «        S  ‰| g|¢R i |¤ŽS ©N)Úcategory)ÚwarningsÚwarnÚFutureWarningÚobjectÚ__new__)ÚclsÚargsÚkwargsÚmsgÚnews      €€r	   Úwrappedz+deprecated._decorate_class.<locals>.wrappedA   sW   ø€ ÝŒM˜#­Ð6Ñ6Ô6Ð6Ø•f”nÐ$Ð$Ý—~’~ cÑ*Ô*Ð*Ø�3�sÐ,˜TÐ,Ð,Ð, VÐ,Ð,Ð,r   r   )Ú__name__r   r   Údeprecated_original)r   r   r$   r"   r#   s      @@r	   r   zdeprecated._decorate_class:   sn   øø€ Ø&¨¬Ñ5ˆØŒ:ð 	'Ø�6˜DœJÑ&Ñ&ˆCàŒkˆð	-ð 	-ð 	-ð 	-ð 	-ð 	-ð ˆŒà$ˆÔØ&)ˆÔ#àˆ
r   c                 ó”   ‡‡— d‰j         z  Š| j        r‰d| j        z  z  Št          j        ‰¦  «        ˆˆfd„¦   «         }‰|_        |S )zDecorate function funzFunction %s is deprecatedr   c                  óJ   •— t          j        ‰t          ¬¦  «          ‰| i |¤ŽS r   )r   r   r   )r    r!   Úfunr"   s     €€r	   r$   z)deprecated._decorate_fun.<locals>.wrappedU   s-   ø€ åŒM˜#­Ð6Ñ6Ô6Ð6Ø�3˜Ð' Ð'Ð'Ð'r   )r%   r   Ú	functoolsÚwrapsÚ__wrapped__)r   r)   r$   r"   s    ` @r	   r   zdeprecated._decorate_funN   so   øø€ ð *¨C¬LÑ8ˆØŒ:ð 	'Ø�6˜DœJÑ&Ñ&ˆCå	Œ˜Ñ	Ô	ð	(ð 	(ð 	(ð 	(ð 	(ñ 
Ô	ð	(ð "ˆÔàˆr   c                 ó|   ‡‡— | j         Št          t          j        ‰j        ¦  «        ˆˆfd„¦   «         ¦   «         }|S )Nc                  óT   •— t          j        ‰t          ¬¦  «          ‰j        | i |¤ŽS r   )r   r   r   Úfget)r    r!   r"   Úprops     €€r	   r$   z.deprecated._decorate_property.<locals>.wrappedc   s1   ø€ õ ŒM˜#­Ð6Ñ6Ô6Ð6Ø�4”9˜dÐ- fÐ-Ð-Ð-r   )r   r   r*   r+   r/   )r   r0   r$   r"   s    ` @r	   r   zdeprecated._decorate_property`   sQ   øø€ ØŒjˆå	Ý	Œ˜œÑ	#Ô	#ð	.ð 	.ð 	.ð 	.ð 	.ñ 
$Ô	#ñ 
Œð	.ð ˆr   N)r   )	r%   Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   © r   r	   r   r      sn   € € € € € ðð ð4ð ð ð ð+ð +ð +ð*ð ð ð(ð ð ð$	ð 	ð 	ð 	ð 	r   c                 ór   — t          | dg ¦  «        }|€g }dd                     d„ |D ¦   «         ¦  «        v }|S )z>Helper to check if func is wrapped by our deprecated decoratorÚ__closure__Nr   r   c                 óP   — g | ]#}t          |j        t          ¦  «        ¯|j        ‘Œ$S r4   )r   Úcell_contentsÚstr)Ú.0Úcs     r	   ú
<listcomp>z"_is_deprecated.<locals>.<listcomp>r   s+   € ÐOÐOÐO˜Q­j¸¼Í#Ñ.NÔ.NÐOˆŒÐOÐOÐOr   )ÚgetattrÚjoin)ÚfuncÚclosuresÚis_deprecateds      r	   Ú_is_deprecatedrB   l   sQ   € å�t˜]¨BÑ/Ô/€HØÐØˆØ  B§G¢GØOÐO (ÐOÑOÔOñ%ô %ð €Mð Ðr   c                 óŽ   — | �|�t          d¦  «        ‚| €|€t          d¦  «        ‚|�t          j        dt          ¦  «         |S | S )zKHelper to deprecate the `Xt` argument in favor of `X` in inverse_transform.Nz%Cannot use both X and Xt. Use X only.z(Missing required positional argument: X.z;Xt was renamed X in version 1.5 and will be removed in 1.7.)Ú	TypeErrorr   r   r   )ÚXÚXts     r	   Ú"_deprecate_Xt_in_inverse_transformrG   x   s]   € à€}˜˜ÝÐ?Ñ@Ô@Ð@à€y�R�ZÝÐBÑCÔCÐCà	€~ÝŒØIÝñ	
ô 	
ð 	
ð ˆ	à€Hr   )r*   r   Ú__all__r   rB   rG   r4   r   r	   ú<module>rI      sz   ðØ Ð Ð Ð Ø €€€àˆ.€ðbð bð bð bð bñ bô bð bðJð ð ðð ð ð ð r   