o
    lÇh˜  ã                   @   s   d d„ Z G dd„ dƒZdS )c                    s   ddœ‡ fdd„
}|S )z{
    Decorator for allowing to use method as normal method or with
    context manager for auto-indenting code blocks.
    T)Úoptimizec                   sD   | j }ˆ | |g|¢R i |¤Ž}|r||kr| j ¡  || _ t| |ƒS ©N)Ú_indent_last_lineÚ_codeÚpopÚIndent)ÚselfÚliner   ÚargsÚkwdsÚ	last_line©Úfunc© úi/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/fastjsonschema/indent.pyÚwrapper   s   

zindent.<locals>.wrapperr   )r   r   r   r   r   Úindent   s   	r   c                   @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )r   c                 C   s   || _ || _d S r   )Úinstancer   )r   r   r   r   r   r   Ú__init__   s   
zIndent.__init__c                 C   s   | j  jd7  _d S ©Né   )r   Ú_indent)r   r   r   r   Ú	__enter__   s   zIndent.__enter__c                 C   s   | j  jd8  _| j| j _d S r   )r   r   r   r   )r   Útype_ÚvalueÚ	tracebackr   r   r   Ú__exit__   s   zIndent.__exit__N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r      s    r   N)r   r   r   r   r   r   Ú<module>   s    