|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib/python2.7/site-packages/click/ |
Upload File : |
�
./�_c @ s� d d l m Z d d l m Z d d l m Z d d l m Z d Z d � Z
d � Z d d d e d
� Z
d e f d � � YZ d
� Z d S( i����( t contextmanageri ( t term_len( t split_opt( t get_terminal_sizec C sy i } xP | D]H } x? t | � D]1 \ } } t | j | d � t | � � | | <q Wq
Wt d � t | j � � D� � S( Ni c s s | ] \ } } | Vq d S( N( ( t .0t xt y( ( s1 /tmp/pip-install-sTXtzD/click/click/formatting.pys <genexpr> s ( t enumeratet maxt getR t tuplet sortedt items( t rowst widthst rowt idxt col( ( s1 /tmp/pip-install-sTXtzD/click/click/formatting.pyt
measure_table s
-c c s8 x1 | D]) } t | � } | d | t | � Vq Wd S( Nt ( R ( R
t len( R
t col_countR ( ( s1 /tmp/pip-install-sTXtzD/click/click/formatting.pyt iter_rows s
iN R c sh d d l m } | j � } | | d | d | d t �} | sM | j | � Sg � g � d � � � � f d � } xn | j � D]` } | s� | � d � q� � d k r� t | � } | j � } | t | � � n � j | � q� W| � g }
xf � D]^ \ � } } | j
d � � �: | r;|
j | j | � � n |
j | j | � � Wd QXq� Wd j |
� S(
s� A helper function that intelligently wraps text. By default, it
assumes that it operates on a single paragraph of text but if the
`preserve_paragraphs` parameter is provided it will intelligently
handle paragraphs (defined by two empty lines).
If paragraphs are handled, a paragraph can be prefixed with an empty
line containing the ``\b`` character (``\x08``) to indicate that
no rewrapping should happen in that block.
:param text: the text that should be rewrapped.
:param width: the maximum width for the text.
:param initial_indent: the initial indent that should be placed on the
first line as a string.
:param subsequent_indent: the indent string that should be placed on
each consecutive line.
:param preserve_paragraphs: if this flag is set then the wrapping will
intelligently handle paragraphs.
i ( t TextWrappert initial_indentt subsequent_indentt replace_whitespacec sy � s
d S� d j � d k rL � j � p/ d t d j � d � f � n% � j � p[ d t d j � � f � � 2d S( Ni s s
i t ( t stript appendt Truet joint False( ( t buft indentt p( s1 /tmp/pip-install-sTXtzD/click/click/formatting.pyt
_flush_par>