U
    nuf                     @   s0   d Z ddlmZ ddlmZ G dd deZdS )zIModule containing a preprocessor that removes the outputs from code cells    )Set   )Preprocessorc                   @   s,   e Zd ZdZeddhjddZdd ZdS )	ClearOutputPreprocessorz?
    Removes the output from all code cells in a notebook.
    	collapsedZscrolledT)configc                 C   s@   |j dkr8g |_d|_d|kr8| jD ]}|j|d q$||fS )zO
        Apply a transformation on each cell. See base.py for details.
        codeNmetadata)Z	cell_typeoutputsZexecution_countremove_metadata_fieldsr	   pop)selfcell	resourcesZ
cell_indexfield r   G/tmp/pip-unpacked-wheel-nxpdnluh/nbconvert/preprocessors/clearoutput.pypreprocess_cell   s    

z'ClearOutputPreprocessor.preprocess_cellN)__name__
__module____qualname____doc__r   tagr   r   r   r   r   r   r      s   r   N)r   Z	traitletsr   baser   r   r   r   r   r   <module>   s   