AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/yaml/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/yaml/__pycache__/composer.cpython-311.pyc |
� �܋f � �` � d dgZ ddlmZ ddlT ddlT G d� de� � Z G d� d � � ZdS )�Composer� ComposerError� )�MarkedYAMLError)�*c � � e Zd ZdS )r N)�__name__� __module__�__qualname__� � �D/opt/cloudlinux/venv/lib64/python3.11/site-packages/yaml/composer.pyr r s � � � � � ��Dr c �D � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd S )r c � � i | _ d S �N)�anchors��selfs r �__init__zComposer.__init__ s � �����r c � � | � t � � r| � � � | � t � � S r )�check_event�StreamStartEvent� get_event�StreamEndEventr s r � check_nodezComposer.check_node sB � ����,�-�-� ��N�N���� �#�#�N�3�3�3�3r c �b � | � t � � s| � � � S d S r )r r �compose_documentr s r �get_nodezComposer.get_node s4 � �����/�/� +��(�(�*�*�*� +� +r c �J � | � � � d }| � t � � s| � � � }| � t � � s0| � � � }t d|j d|j � � �| � � � |S )Nz(expected a single document in the streamzbut found another document)r r r r r � start_mark)r �document�events r �get_single_nodezComposer.get_single_node s� � ������� ������/�/� /��,�,�.�.�H� ����/�/� &��N�N�$�$�E�� J��'�)E��$�&� &� &� �������r c � � | � � � | � d d � � }| � � � i | _ |S r )r �compose_noder )r �nodes r r zComposer.compose_document2 sG � ������� � � ��t�,�,�� ����������r c �� � | � t � � rK| � � � }|j }|| j vrt d d d|z |j � � �| j | S | � � � }|j }|�3|| j v r*t d|z | j | j d|j � � �| � ||� � | � t � � r| � |� � }n_| � t � � r| � |� � }n/| � t � � r| � |� � }| � � � |S )Nzfound undefined alias %rz+found duplicate anchor %r; first occurrencezsecond occurrence)r � AliasEventr �anchorr r r � peek_event�descend_resolver�ScalarEvent�compose_scalar_node�SequenceStartEvent�compose_sequence_node�MappingStartEvent�compose_mapping_node�ascend_resolver)r �parent�indexr! r( r% s r r$ zComposer.compose_node? sz � ����J�'�'� (��N�N�$�$�E��\�F��T�\�)�)�#�D�$�0J� �1!�"'�"2�4� 4� 4��<��'�'����!�!����������%�%�#�$Q� �%!�"&�,�v�"6�"A�+�U�-=�?� ?� ?� ���f�e�,�,�,����K�(�(� 5��+�+�F�3�3�D�D� � � �0� 1� 1� 5��-�-�f�5�5�D�D� � � �/� 0� 0� 5��,�,�V�4�4�D��������r c � � | � � � }|j }|�|dk r&| � t |j |j � � }t ||j |j |j |j �� � }|� || j |<