o
    GÆÏiD  ã                   @   s   d Z ddlZdd„ ZdS )z3
Doc utilities: Utilities related to documentation
é    Nc                    s   ‡ fdd„}|S )Nc                    sš   | j }| d¡}d}|t|ƒk r.t d|| ¡d u r.|d7 }|t|ƒk r.t d|| ¡d u s|t|ƒk r>ˆ ||< d |¡}n
td| › d|› ƒ‚|| _ | S )NÚ
r   z^\s*Examples?:\s*$é   zThe function zY should have an empty 'Examples:' in its docstring as placeholder, current docstring is:
)Ú__doc__ÚsplitÚlenÚreÚsearchÚjoinÚ
ValueError)ÚfnÚfunc_docÚlinesÚi©Úexample_docstring© úM/home/ubuntu/.local/lib/python3.10/site-packages/diffusers/utils/doc_utils.pyÚdocstring_decorator   s    
  ÿÿÿz6replace_example_docstring.<locals>.docstring_decoratorr   )r   r   r   r   r   Úreplace_example_docstring   s   r   )r   r   r   r   r   r   r   Ú<module>   s   