ruạṛ
a �+�b� � @ sF d Z ddlmZ ddlmZ ddd�Zddd �Zd d� Zdd 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. � )�absolute_import� �� InterfaceFc C s� |rdd� }ndd� }|| � � �g}|j}d}| �� rL|tt| �� �|�� dd� | jD �}|r�|td||�� |d7 }|D ](}d||� � � } |tt| �||�� q||d8 }t| �� �} |td ||�� |d7 }| D ]D\}}t|d �s�d||� � �|�� �p df } |tt| �||�� q�|d8 }|td ||�� |d7 }| D ]X\}}t|d ��r@d|� � |� � f } d|| �|�� �p|df } |tt| �||�� �q@d� |�d 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 S s d| f S )Nz``%s``� ��sr r �R/usr/lib64/python3.9/site-packages/mercurial/thirdparty/zope/interface/document.py�<lambda>! � z"asStructuredText.<locals>.<lambda>c S s | S )Nr r r r r r # r r c S s g | ]}|t ur|�qS r r )�.0�baser r r � <listcomp>, s �z$asStructuredText.<locals>.<listcomp>zThis interface extends:zo %szAttributes:�getSignatureStringz%s -- %szno documentationzMethods:z%s%sz )�getName�appendZgetDoc�_justify_and_indent�_trim_doc_string� __bases__�sorted�namesAndDescriptions�hasattrr �join)�I�munge�rstZinline_literal�rZoutp�level�bases�b�itemr �nameZdescZ_callr r r �asStructuredText sL � ��r"