/usr/lib/python3/dist-packages/zope/interface/__pycache__
Edit: /usr/lib/python3/dist-packages/zope/interface/__pycache__/document.cpython-310.pyc (3160B)
o
$
x` @ s> d Z ddlZddgZd
ddZdddZdd ZdddZdS )z Pretty-Print an Interface object as structured text (Yum)
This module provides a function, asStructuredText, for rendering an
interface as structured text.
NasReStructuredTextasStructuredTextFc C s |rdd }ndd }|| g}|j}d}| r&|tt| | dd | jD }|rW|td|| |d7 }|D ]}d|| } |tt| || q>|d8 }t| }
|td || |d7 }|
D ]!\}}t|d
sd|| | pdf } |tt| || qk|d8 }|td
|| |d7 }|
D ])\}}t|d
rd| | f }
d||
| pdf } |tt| || qd
|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 9/usr/lib/python3/dist-packages/zope/interface/document.py
# s
z"asStructuredText..c S s | S )Nr r r r r r % s c S s g | ]
}|t jjur|qS r )zope interface Interface).0baser r r
. s
z$asStructuredText..zThis interface extends:zo %szAttributes:getSignatureStringz%s -- %szno documentationzMethods:z%s%sz
)getNameappendgetDoc_justify_and_indent_trim_doc_string __bases__sortednamesAndDescriptionshasattrr join)Imungerstinline_literalroutplevelbasesbitemr namedesc_callr r r r sP
c C s t | |ddS )zi Output reStructuredText format. Note, this will whack any existing
'structured' format of the text.T)r r )r )r r r r r r Q s c C sZ | ddd}|dg}|r(tdd |D }|D ]}|||d qd|S )zJ Trims a doc string to make it format
correctly with structured text.
r c S s g | ]}t |t | qS r )lenlstrip)r
liner r r r ^ s z$_trim_doc_string..N)replacesplitpopminr r )textlinesnlines
min_indentr, r r r r W s
r H c C s d| }|r1g }|}| } | D ]}d||g}t||kr&|| |}q|| d|S || dddd| S )z9 indent and justify text, rejustify (munge) if specified r) r( )r. r r* r stripr- )r1 r! r widthindentr2 r, wordr r r r f s
r )r F)r )r r5 )__doc__zope.interfacer
__all__r r r r r r r r s
7