HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/zope/interface/__pycache__/document.cpython-38.pyc
U

ؒ�]��@s6dZddlZd
dd�Zddd�Zdd	�Zddd�ZdS)z� Pretty-Print an Interface object as structured text (Yum)

This module provides a function, asStructuredText, for rendering an
interface as structured text.
�NFcCs�|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||���|���pdf}	|tt|	�||��q�|d8}|td
||��|d7}|
D]X\}}t|d
��r@d|��|�	�f}
d||
�|���p|df}	|tt|	�||���q@d�
|�dS)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.
    cSs
d|fS)Nz``%s``���srr�9/usr/lib/python3/dist-packages/zope/interface/document.py�<lambda>�z"asStructuredText.<locals>.<lambda>cSs|S)Nrrrrrr!r�cSsg|]}|tjjk	r|�qSr)�zopeZ	interfaceZ	Interface)�.0�baserrr�
<listcomp>*s�z$asStructuredText.<locals>.<listcomp>zThis interface extends:zo %szAttributes:�getSignatureStringz%s -- %szno documentationzMethods:z%s%sz

)ZgetName�appendZgetDoc�_justify_and_indent�_trim_doc_string�	__bases__�sorted�namesAndDescriptions�hasattrr
�join)�I�munge�rstZinline_literal�rZoutp�level�bases�b�itemr�nameZdescZ_callrrr�asStructuredTextsL
�
��rcCst||dd�S)zi Output reStructuredText format.  Note, this will whack any existing
    'structured' format of the text.T)rr)r)rrrrr�asReStructuredTextMsr cCsZ|�dd��d�}|�d�g}|rPtdd�|D��}|D]}|�||d��q8d�|�S)zJ Trims a doc string to make it format
    correctly with structured text. �
�
rcSs g|]}t|�t|����qSr)�len�lstrip)r
�linerrrrZs�z$_trim_doc_string.<locals>.<listcomp>N)�replace�split�pop�minrr)�text�linesZnlinesZ
min_indentr%rrrrSs�r�HcCs�d|}|rbg}|}|��}|D],}d�||g�}t|�|kr |�|�|}q |�|�d�|�S||���dd��dd|�SdS)z9 indent and justify text, rejustify (munge) if specified � r"r!N)r'rr#r�stripr&)r*rr�width�indentr+r%Zwordrrrrbs


�r)rF)r)rr,)�__doc__Zzope.interfacer	rr rrrrrr�<module>s

7