§
    ¦˜ºh|
  ã                   óB   — d dl mZmZ d dlmZ  G d„ d¦  «        Zd„ ZdS )é    )Úupdate_wrapperÚwraps)Ú
MethodTypec                   ó    — e Zd ZdZd„ Zdd„ZdS )Ú_AvailableIfDescriptorav  Implements a conditional property using the descriptor protocol.

    Using this class to create a decorator will raise an ``AttributeError``
    if check(self) returns a falsey value. Note that if check raises an error
    this will also result in hasattr returning false.

    See https://docs.python.org/3/howto/descriptor.html for an explanation of
    descriptors.
    c                 óP   — || _         || _        || _        t          | |¦  «         d S ©N)ÚfnÚcheckÚattribute_namer   )Úselfr
   r   r   s       úc/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/sklearn/utils/_available_if.pyÚ__init__z_AvailableIfDescriptor.__init__   s0   € ØˆŒØˆŒ
Ø,ˆÔõ 	�t˜RÑ Ô Ð Ð Ð ó    Nc                 ó  ‡ ‡— t          dt          |j        ¦  «        › dt          ‰ j        ¦  «        › �¦  «        Š|�-‰                      |¦  «        s‰‚t          ‰ j        |¦  «        }n t          ‰ j        ¦  «        ˆˆ fd„¦   «         }|S )NzThis z has no attribute c                  óX   •— ‰                      | d         ¦  «        s‰‚ ‰j        | i |¤ŽS )Nr   )r   r
   )ÚargsÚkwargsÚattr_errr   s     €€r   Úoutz+_AvailableIfDescriptor.__get__.<locals>.out&   s7   ø€ à—z’z $ q¤'Ñ*Ô*ð #Ø"�NØ�t”w Ð/¨Ð/Ð/Ð/r   )ÚAttributeErrorÚreprÚ__name__r   r   r   r
   r   )r   ÚobjÚownerr   r   s   `   @r   Ú__get__z_AvailableIfDescriptor.__get__   s§   øø€ Ý!ØW•D˜œÑ(Ô(ÐWÐW½DÀÔATÑ<UÔ<UÐWÐWñ
ô 
ˆð ˆ?ð —:’:˜c‘?”?ð Ø�Ý˜TœW cÑ*Ô*ˆCˆCõ
 �4”7‰^Œ^ð0ð 0ð 0ð 0ð 0ñ Œ^ð0ð
 ˆ
r   r	   )r   Ú
__module__Ú__qualname__Ú__doc__r   r   © r   r   r   r      sA   € € € € € ðð ð!ð !ð !ðð ð ð ð ð r   r   c                 ó   ‡ — ˆ fd„S )a  An attribute that is available only if check returns a truthy value.

    Parameters
    ----------
    check : callable
        When passed the object with the decorated method, this should return
        a truthy value if the attribute is available, and either return False
        or raise an AttributeError if not available.

    Returns
    -------
    callable
        Callable makes the decorated method available if `check` returns
        a truthy value, otherwise the decorated method is unavailable.

    Examples
    --------
    >>> from sklearn.utils.metaestimators import available_if
    >>> class HelloIfEven:
    ...    def __init__(self, x):
    ...        self.x = x
    ...
    ...    def _x_is_even(self):
    ...        return self.x % 2 == 0
    ...
    ...    @available_if(_x_is_even)
    ...    def say_hello(self):
    ...        print("Hello")
    ...
    >>> obj = HelloIfEven(1)
    >>> hasattr(obj, "say_hello")
    False
    >>> obj.x = 2
    >>> hasattr(obj, "say_hello")
    True
    >>> obj.say_hello()
    Hello
    c                 ó2   •— t          | ‰| j        ¬¦  «        S )N)r   )r   r   )r
   r   s    €r   ú<lambda>zavailable_if.<locals>.<lambda>V   s   ø€ Õ,¨R°ÀrÄ{ÐSÑSÔS€ r   r    )r   s   `r   Úavailable_ifr$   /   s   ø€ ðN TÐSÐSÐSÐSr   N)Ú	functoolsr   r   Útypesr   r   r$   r    r   r   ú<module>r'      sv   ðØ +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ø Ð Ð Ð Ð Ð ð'ð 'ð 'ð 'ð 'ñ 'ô 'ð 'ðT'Tð 'Tð 'Tð 'Tð 'Tr   