관리-도구
편집 파일: _wrap.cpython-38.pyc
U ʗRe0 � @ s� d dl Z d dlmZmZmZ ddlmZ ddlmZm Z e � d�Zeeee e ef d�dd �Zdee eee d�dd �Zedkr�ddlmZ edd�Ze�d� ee dddd�� dS )� N)�Iterable�List�Tuple� )� loop_last)�cell_len� chop_cellsz \s*\S+\s*)�text�returnc c sL d}t �| |�}|d k rH|�� \}}|�d�}|||fV t �| |�}qd S )Nr )�re_word�match�span�group)r �position� word_match�start�end�word� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/rich/_wrap.py�words s r T)r �width�foldr c C s� g }|j }d}t}t| �D ]�\}}} || �� �} || |kr�| |kr�|r�t| |dd�}t|�D ].\}} |rr||� |r�|| �}q^|t| �7 }q^q�|r�||� || �}q�|r�|r�||� || �}q||| �7 }q|S )Nr )�max_sizer )�appendr r �rstripr r �len)r r r �dividesr � line_position� _cell_lenr �_endr �word_length� chopped_words�last�liner r r �divide_line s0 r% �__main__)�Console� )r z@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345�abcdefghijklmnopqrstuvwxyz� )r )T)�re�typingr r r �_loopr �cellsr r �compiler �str�intr �boolr% �__name__�consoler'