�
JDvc� � �8 � d Z ddlZddgZdd�Zdd�Zd� Zd
d
�ZdS )z� Pretty-Print an Interface object as structured text (Yum)
This module provides a function, asStructuredText, for rendering an
interface as structured text.
� N�asReStructuredText�asStructuredTextFc � � |rd� }nd� } || � � � � � g}|j }d}| � � � r8 |t t | � � � � � |� � � � d� | j D � � }|rp |t d||� � � � |dz
}|D ]I}d ||� � � � � z } |t t | � � ||� � � � �J|dz }t
| � � � � � }
|t d||� � � � |dz
}|
D ]r\ }}t |d� � s] ||� � � � � �d |� � � pd
��} |t t | � � ||� � � � �s|dz } |t d||� � � � |dz
}|
D ]�\ }}t |d� � ru|� � � �|� � � ��}
||
� � �d |� � � pd
��} |t t | � � ||� � � � ��d�
|� � dz S )
z� Output structured text format. Note, this will whack any existing
'structured' format of the text.
If `rst=True`, then the output will quote all code as inline literals in
accordance with 'reStructuredText' markup principles.
c � � d| �d�S )Nz``� ��ss �9/usr/lib/python3/dist-packages/zope/interface/document.py�<lambda>z"asStructuredText.<locals>.<lambda># s � � �q�q�q�?� � c � � | S )Nr r s r
r z"asStructuredText.<locals>.<lambda>% s � �1� r � c �8 � g | ]}|t j j u�|��S r )�zope� interface� Interface)�.0�bases r
�
<listcomp>z$asStructuredText.<locals>.<listcomp>. s2 � �
�
�
���D�N�4�4�4� �4�4�4r zThis interface extends:zo %szAttributes:�getSignatureStringz -- zno documentationzMethods:z
)�getName�append�getDoc�_justify_and_indent�_trim_doc_string� __bases__�sorted�namesAndDescriptions�hasattrr �join)�I�munge�rst�inline_literal�r�outp�level�bases�b�itemr �name�desc�_calls r
r r s� � � � %�2�2���$��� ��� � ��� $� $�%�A��8�D�
�E��x�x�z�z� G���
�!1�!�(�(�*�*�!=�!=�u�
E�
E�F�F�F�
�
���
�
�
�E�
� ���
�!:�E�5�
I�
I�J�J�J�
��
��� L� L�A��N�N�1�9�9�;�;�7�7�7�D��D�$�%5�d�%;�%;�U�E�J�J�K�K�K�K�
��
��!�!�"8�"8�":�":�;�;���D� �]�E�5� 9� 9�:�:�:� �Q�J�E�*� L� L�
��d��t�1�2�2� L�!/�������!?�!?�!?�!?�!%�����!D�2D�!D�F�D��D�$�%5�d�%;�%;�U�E�J�J�K�K�K�� �Q�J�E��D� �Z��� 6� 6�7�7�7� �Q�J�E�*� L� L�
��d��4�-�.�.� L�"�l�l�n�n�n�d�.E�.E�.G�.G�.G�H�E�!/���!6�!6�!6�!6�!%�����!D�2D�!D�F�D��D�$�%5�d�%;�%;�U�E�J�J�K�K�K���;�;�q�>�>�F�"�"r c �& |