�
��e� � �6 � d Z ddlZddgZd d�Zd
d�Zd� Zdd�Zy)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�asStructuredTextc � � |rd� }nd� } || j � � g}|j }d}| j � r) |t t | j � � |� � | j
D �cg c] }|t j j ur|��" }}|rY |t d||� � |dz
}|D ]7 } d || j � � z }
|t t |
� ||� � �9 |dz }t | j � � } |t d||� � |dz
}|D ]f \ }}
t |
d� r�dj ||
j � � |
j � xs d � }
|t t |
� ||� � �h |dz } |t d
||� � |dz
}|D ]� \ }}
t |
d� s�dj |
j � |
j � � }dj ||� |
j � xs d � }
|t t |
� ||� � �� dj |� dz S c c}w )
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 �$ � dj | � S )Nz``{}``)�format��ss �9/usr/lib/python3/dist-packages/zope/interface/document.py�<lambda>z"asStructuredText.<locals>.<lambda># s � �8�?�?�1�#5� � c � � | S )N� r s r
r z"asStructuredText.<locals>.<lambda>% s � �1� r � zThis interface extends:zo %szAttributes:�getSignatureStringz{} -- {}zno documentationzMethods:z{}{}z
)�getName�append�getDoc�_justify_and_indent�_trim_doc_string� __bases__�zope� interface� Interface�sorted�namesAndDescriptions�hasattrr r �join)�I�munge�rst�inline_literal�r�outp�level�base�bases�b�itemr �name�desc�_calls r
r r sI � � �5��$�� �� � �� $�%�A��8�8�D�
�E��x�x�z��
�!1�!�(�(�*�!=�u�
E�F� ���
���D�N�N�4�4�4� �
�E�
�
��
�!:�E�5�
I�J�
��
��� L�A��N�1�9�9�;�7�7�D��$�%5�d�%;�U�E�J�K� L� ��
��!�!�"8�"8�":�;��� �]�E�5� 9�:� �Q�J�E�*� L�
��d��t�1�2��$�$�^�D�L�L�N�%C�!%����!D�2D�F�D��$�%5�d�%;�U�E�J�K� L�
�Q�J�E�� �Z��� 6�7� �Q�J�E�*� L�
��d��4�-�.��M�M�$�,�,�.�$�2I�2I�2K�L�E��$�$�^�E�%:�!%����!D�2D�F�D��$�%5�d�%;�U�E�J�K�L� �;�;�q�>�F�"�"��A
s �6%Ic � � t | |d�� S )zi Output reStructuredText format. Note, this will whack any existing
'structured' format of the text.T)r r )r )r r s r
r r Q s � � �A�U��5�5r c
�F � | j dd� j d� }|j d� g}|rWt |D �cg c]' |