a
    þd  ã                   @   s8   d dl Z d dlmZmZ deeeee edœdd„ZdS )é    N)ÚCallableÚOptionalF)Úhook_fxÚparamÚexplicitÚmin_argsÚreturnc                 C   sF   t  | ¡}|jdd… }||v pD| r0|jdupDt|tƒoDt|ƒ|kS )zö
    Args:
        hook_fx: the hook callable
        param: the name of the parameter to check
        explicit: whether the parameter has to be explicitly declared
        min_args: whether the `signature` as at least `min_args` parameters
    é   N)ÚinspectÚgetfullargspecÚargsÚvarargsÚ
isinstanceÚintÚlen)r   r   r   r   Ú
parametersr   © r   út/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/pytorch_lightning/utilities/signature_utils.pyÚis_param_in_hook_signature   s    

ÿýr   )FN)r
   Útypingr   r   ÚstrÚboolr   r   r   r   r   r   Ú<module>   s    ÿþ