관리-도구
편집 파일: genshi.cpython-311.pyc
� �Re� � �L � d dl mZmZmZ d dlmZmZ d dlmZmZm Z m Z mZ d� ZdS )� )�absolute_import�division�unicode_literals)�QName�Attrs)�START�END�TEXT�COMMENT�DOCTYPEc # � K � g }| D �]T}|d }|dv r|� |d � � n#|r!t d� |� � dfV � g }|dv ry|d rd|d �d |d ��}n|d }t d� |d � � � D � � � � }t t |� � |fdfV � |dk rd }|d k r@|d rd|d �d |d ��}n|d }t t |� � dfV � ��|dk rt |d dfV � ��+|dk r#t |d |d |d fdfV � ��T��V|r!t d� |� � dfV � dS dS )z�Convert a tree to a genshi tree :arg walker: the treewalker to use to walk the tree to convert it :returns: generator of genshi nodes �type)� Characters�SpaceCharacters�data� )N���r )�StartTag�EmptyTag� namespace�{�}�namec �\ � g | ])\ }}t |d �d|z n|d � � |f��*S )r Nz{%s}%s� )r )�.0�attr�values ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py� <listcomp>zto_genshi.<locals>.<listcomp> sV � � E� E� E�*�t�U� "�T�!�W�5H�(�T�/�/�d�ST�g�V�V�X]�^� E� E� E� r �EndTag�Comment�Doctype�publicId�systemIdN) �appendr �joinr �itemsr r r r r )�walker�text�tokenr r �attrss r � to_genshir. s* � � � � �D�� #� #���V�}���4�4�4��K�K��f� �&�&�&�&� � ������ � �~�5�5�5�5��D��+�+�+��[�!� %� %�#(��#5�#5�#5�u�V�}�}�E����V�}��� E� E�.3�F�m�.A�.A�.C�.C�E� E� E� F� F�E��5��;�;��.��?�?�?�?��z�!�!����8����[�!� %� %�#(��#5�#5�#5�u�V�}�}�E����V�}���u�T�{�{�N�2�2�2�2�2� �Y� � ��5��=�.�8�8�8�8�8� �Y� � ��E�&�M�5��+<�!�*�-�/�0>�?� ?� ?� ?� ?� �� 2��B�G�G�D�M�M�>�1�1�1�1�1�1�2� 2r! N) � __future__r r r �genshi.corer r r r r r r r. � r! r �<module>r2 s~ �� B� B� B� B� B� B� B� B� B� B� $� $� $� $� $� $� $� $� :� :� :� :� :� :� :� :� :� :� :� :� :� :�/2� /2� /2� /2� /2r!