ok

Mini Shell

Direktori : /opt/alt/python38/lib64/python3.8/site-packages/yaml/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/site-packages/yaml/__pycache__/composer.cpython-38.pyc

U

b�`�@sFddgZddlmZddlTddlTGdd�de�ZGdd�d�ZdS)�Composer�
ComposerError�)�MarkedYAMLError)�*c@seZdZdS)rN)�__name__�
__module__�__qualname__�r	r	�@/opt/alt/python38/lib64/python3.8/site-packages/yaml/composer.pyrsc@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)rcCs
i|_dS�N)�anchors��selfr	r	r
�__init__
szComposer.__init__cCs|�t�r|��|�t�Sr)�check_eventZStreamStartEvent�	get_event�StreamEndEventr
r	r	r
�
check_nodes
zComposer.check_nodecCs|�t�s|��SdSr)rr�compose_documentr
r	r	r
�get_nodes
zComposer.get_nodecCsN|��d}|�t�s|��}|�t�sB|��}td|jd|j��|��|S)Nz(expected a single document in the streamzbut found another document)rrrrr�
start_mark)rZdocument�eventr	r	r
�get_single_nodes

�zComposer.get_single_nodecCs&|��|�dd�}|��i|_|Sr)r�compose_noder)r�noder	r	r
r2s
zComposer.compose_documentcCs�|�t�r@|��}|j}||jkr6tddd||j��|j|S|��}|j}|dk	r|||jkr|td||j|jd|j��|�||�|�t	�r�|�
|�}n*|�t�r�|�|�}n|�t
�r�|�|�}|��|S)Nzfound undefined alias %rz+found duplicate anchor %r; first occurrencezsecond occurrence)rZ
AliasEventr�anchorrrrZ
peek_eventZdescend_resolverZScalarEvent�compose_scalar_nodeZSequenceStartEvent�compose_sequence_nodeZMappingStartEvent�compose_mapping_nodeZascend_resolver)r�parent�indexrrrr	r	r
r?s<

��

�
�



zComposer.compose_nodecCs`|��}|j}|dks|dkr0|�t|j|j�}t||j|j|j|jd�}|dk	r\||j	|<|S)N�!)�style)
r�tag�resolveZ
ScalarNode�value�implicitr�end_markr"r)rrrr#rr	r	r
rXs�
zComposer.compose_scalar_nodecCs�|��}|j}|dks|dkr.|�td|j�}t|g|jd|jd�}|dk	rV||j|<d}|�t	�s�|j
�|�||��|d7}qZ|��}|j
|_
|S)Nr!��
flow_style�r)rr#r$ZSequenceNoder&rr)rrZSequenceEndEventr%�appendrr')rr�start_eventr#rr �	end_eventr	r	r
rcs$�


zComposer.compose_sequence_nodecCs�|��}|j}|dks|dkr.|�td|j�}t|g|jd|jd�}|dk	rV||j|<|�t	�s�|�
|d�}|�
||�}|j�||f�qV|��}|j
|_
|S)Nr!r()rr#r$ZMappingNoder&rr)rrZMappingEndEventrr%r+r')rrr,r#rZitem_keyZ
item_valuer-r	r	r
rus$�

zComposer.compose_mapping_nodeN)rrrrrrrrrrrrr	r	r	r
rs
N)�__all__�errorrZeventsZnodesrrr	r	r	r
�<module>s


Zerion Mini Shell 1.0