o
    tf                     @  s   d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z
 ddlmZ zddlmZ ddlmZ W n eyA   dd	lmZmZ Y nw dddZdddZdddZdddZ	dS ) zYaml utilities.    )annotations)PathPurePath)Any)dump)load)CSafeDumper)CSafeLoader)
SafeDumper
SafeLoaderstreamr   returnc                 C     t | tdS )zLoad yaml from a stream.)Loader)yloadr   r    r   \/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/jupyter_events/yaml.pyloads      r   strc                 C  r   )z7Parse the first YAML document in a stream as an object.)ZDumper)ydumpr
   r   r   r   r   dumps   r   r   fpathstr | PurePathc                 C  s   t t| jdd}t|S )zLoad yaml from a file.utf-8encoding)r   r   	read_textr   )r   datar   r   r   r      s   r   r   outpathNonec                 C  s   t |jt| dd dS )z1Parse the a YAML document in a file as an object.r   r   N)r   
write_textr   )r   r    r   r   r   r   "   s   r   N)r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r   r    r   r   r!   )__doc__
__future__r   pathlibr   r   typingr   yamlr   r   r   r   r   r
   r	   r   ImportErrorr   r   r   r   r   r   <module>   s     


