
    Mh                    \    d Z ddlmZ ddlmZ  G d de          Zd ZddZdd	Zdd
Z	dS )zAThe basic dict based notebook format.

Authors:

* Brian Granger
    )annotations)Structc                      e Zd ZdZdS )NotebookNodezA notebook node object.N)__name__
__module____qualname____doc__     R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/nbformat/v1/nbbase.pyr   r      s        !!!!r   r   c                    t          | t                    r<t                      }|                                 D ]\  }}t	          |          ||<   |S t          | t
          t          f          rd | D             S | S )z'Create notebook node(s) from an object.c                ,    g | ]}t          |          S r   )	from_dict).0is     r   
<listcomp>zfrom_dict.<locals>.<listcomp>'   s    (((	!(((r   )
isinstancedictr   itemsr   tuplelist)dnewdkvs       r   r   r      s}    !T ~~GGII 	# 	#DAqllDGG!eT]## )((a((((Hr   Nc                    t                      }d|_        | t          |           |_        |t	          |          |_        |S )z,Create a new code cell with input and outputcode)r   	cell_typestrr   intprompt_number)r   r"   cells      r   new_code_cellr$   +   s@    >>DDNII	  //Kr   c                \    t                      }| t          |           |_        d|_        |S )zCreate a new text cell.Ntext)r   r    r&   r   )r&   r#   s     r   new_text_cellr'   6   s*    >>DII	DNKr   c                D    t                      }| | |_        ng |_        |S )z7Create a notebook by name, id and a list of worksheets.)r   cells)r)   nbs     r   new_notebookr+   ?   s&    	BIr   )NN)N)
r
   
__future__r   nbformat._structr   r   r   r$   r'   r+   r   r   r   <module>r.      s    " # " " " " " # # # # # #" " " " "6 " " "	 	 	           r   