HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/zope/interface/__pycache__/document.cpython-39.pyc
a

��_��@s>dZddlZddgZd
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.
�N�asReStructuredText�asStructuredTextFcCs�|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|]}|tjjur|�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_callrrrrsL
�
��cCst||dd�S)zi Output reStructuredText format.  Note, this will whack any existing
    'structured' format of the text.T)rr)r)rrrrrrQscCsZ|�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^s�z$_trim_doc_string.<locals>.<listcomp>N)�replace�split�pop�minrr)�text�linesZnlinesZ
min_indentr%rrrrWs�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%Zwordrrrrfs


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