U
    2e                     @   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                   s>   | j } | |f||}|r.||kr.| j  || _ t| |S N)_indent_last_line_codepopIndent)selfliner   argskwds	last_linefunc 4lib/python3.8/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   Z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   