Edit File: __init__.cpython-37.pyc
B ��:[�% � @ s� d dl T d dlT d dlT d dlT d dlT d dlT dZyd dlT dZW n e k r\ dZY nX ddl Z efdd�Zefd d �Z efdd�Zefd d�Zefdd�Zefdd�Zdd� Zdd� Zdedddddfdd�Zdeddddddddddfdd�Zdefdd�Zdeddddddddddddfdd�Zdefdd �Zd6d!d"�Zd7d#d$�Zdeefd%d&�Zdeefd'd(�Zefd)d*�Zefd+d,�Zefd-d.�Z efd/d0�Z!G d1d2� d2e"�Z#G d3d4� d4e#d5�Z$dS )8� )�*z3.13TF� Nc c s4 || �}zx|� � r |�� V qW W d|�� X dS )z9 Scan a YAML stream and produce scanning tokens. N)Zcheck_tokenZ get_token�dispose)�stream�Loader�loader� r �@/opt/alt/python37/lib64/python3.7/site-packages/yaml/__init__.py�scan s r c c s4 || �}zx|� � r |�� V qW W d|�� X dS )z9 Parse a YAML stream and produce parsing events. N)Zcheck_eventZ get_eventr )r r r r r r �parse s r c C s || �}z|� � S |�� X dS )zj Parse the first YAML document in a stream and produce the corresponding representation tree. N)Zget_single_noder )r r r r r r �compose* s r c c s4 || �}zx|� � r |�� V qW W d|�� X dS )zb Parse all YAML documents in a stream and produce corresponding representation trees. N)Z check_nodeZget_noder )r r r r r r �compose_all5 s r c C s || �}z|� � S |�� X dS )zd Parse the first YAML document in a stream and produce the corresponding Python object. N)Zget_single_datar )r r r r r r �loadA s r c c s4 || �}zx|� � r |�� V qW W d|�� X dS )z\ Parse all YAML documents in a stream and produce corresponding Python objects. N)Z check_data�get_datar )r r r r r r �load_allL s r c C s t | t�S )z� Parse the first YAML document in a stream and produce the corresponding Python object. Resolve only basic YAML tags. )r � SafeLoader)r r r r � safe_loadX s r c C s t | t�S )z~ Parse all YAML documents in a stream and produce corresponding Python objects. Resolve only basic YAML tags. )r r )r r r r � safe_load_all` s r c C sd d}|dkrt �� }|j}|||||||d�} zx| D ]} | �| � q6W W d| �� X |r`|� S dS )zl Emit YAML parsing events into a stream. If stream is None, return the produced string instead. N)� canonical�indent�width� allow_unicode� line_break)�io�StringIO�getvalue�emitr )�eventsr �Dumperr r r r r r �dumper�eventr r r r h s r c C s� d} |dkr,|dkrt �� }nt �� }|j} ||||||||||| | d�}z,|�� x| D ]}|�|� qZW |�� W d|�� X | r�| � S dS )z� Serialize a sequence of representation trees into a YAML stream. If stream is None, return the produced string instead. N) r r r r r �encoding�version�tags�explicit_start�explicit_end)r r �BytesIOr �open� serialize�closer )�nodesr r r r r r r r! r$ r% r"