%PDF- %PDF-
Direktori : /lib/python3/dist-packages/yaml/__pycache__/ |
Current File : //lib/python3/dist-packages/yaml/__pycache__/composer.cpython-312.pyc |
� f � �V � d dgZ ddlmZ ddl� ddl� G d� de� Z G d� d � Zy)�Composer� ComposerError� )�MarkedYAMLError)�*c � � e Zd Zy)r N)�__name__� __module__�__qualname__� � �//usr/lib/python3/dist-packages/yaml/composer.pyr r s � �r c �B � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zy )r c � � i | _ y �N)�anchors��selfs r �__init__zComposer.__init__ s � ���r c �x � | j t � r| j � | j t � S r )�check_event�StreamStartEvent� get_event�StreamEndEventr s r � check_nodezComposer.check_node s1 � ����,�-��N�N�� �#�#�N�3�3�3r c �N � | j t � s| j � S y r )r r �compose_documentr s r �get_nodezComposer.get_node s$ � �����/��(�(�*�*� 0r c �" � | j � d }| j t � s| j � }| j t � s2| j � }t d|j d|j � �| 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 �x � | j � | j d d � }| j � i | _ |S r )r �compose_noder )r �nodes r r zComposer.compose_document2 s8 � ����� � � ��t�,�� ��������r c � � | j t � rT| j � }|j }|| j vrt d d d|z |j � �| j | S | j � }|j }|�@|| j v r2t d|z | j | j d|j � �| j ||� | j t � r| j |� }nM| j t � r| j |� }n&| j t � r| j |� }| j � 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? s@ � ����J�'��N�N�$�E��\�\�F��T�\�\�)�#�D�$�0J� �1!�"'�"2�"2�4� 4��<�<��'�'����!������������%�#�$Q� �%!�"&�,�,�v�"6�"A�"A�+�U�-=�-=�?� ?� ���f�e�,����K�(��+�+�F�3�D� � � �0� 1��-�-�f�5�D� � � �/� 0��,�,�V�4�D������r c �4 � | j � }|j }|�|dk( r+| j t |j |j � }t ||j |j |j |j �� }|�|| j |<