a
    ø£Be¢  ã                   @   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|v 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   úf/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/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   