Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_wrap.cpython-313.pyc35 linesDownload Raw Back to __pycache__
1�

2�jL
��r�SSKJr SSKrSSKJr SSKJr SSKJrJ	r	 \R"S5rSSjrSSS	jjr
\S3:XauSSKJr \"SS
9r\R#S5 \"\	"SS55 \"SS
9r\R%5 \R#S5 \R%5 \R#S5 gg)�)�annotationsN)�Iterable�)�	loop_last)�cell_len�4chop_cellsz	\s*\S+\s*c#��# �Sn[RX5nUbDUR5up4URS5nX4U4v� [RX5nUbMCgg7f)z�Yields each word from the text as a tuple5containing (start_index, end_index, word). A "word" in this context may6include the actual word and any whitespace to the right.7rN)�re_word�match�span�group)�text�position�8word_match�start�end�words      �PD:\code\apps\devtools\python\user_packages\Python313\site-packages\rich/_wrap.py�wordsrs_���9�H����t�.�J�10�11 ��_�_�&�12������"���$����]�]�4�-�13�	�14 �s�AA"� A"c���/nURnSn[n[U5H�upxn	U"U	R55n15X-16nX�:�nU(aXV"U	5-
nM7X�:�amU(aM[	X�S9n
[U
5H3up�U(aU"U5 U(a17U"U5nM%U[
U5-
nM5 M�U(aU"U5 U"U	5nM�U(dM�U(dM�U"U5 U"U	5nM� U$)axGiven a string of text, and a width (measured in cells), return a list18of cell offsets which the string should be split at in order for it to fit19within the given width.20 21Args:22    text: The text to examine.23    width: The available cell width.24    fold: If True, words longer than `width` will be folded onto a new line.25 26Returns:27    A list of indices to break the line at.28r��width)�appendrr�rstriprr�len)rr�fold�break_positionsr�cell_offset�	_cell_lenr�_endr�word_length�remaining_space�word_fits_remaining_space�folded_word�last�lines                r�divide_liner's���"$�O�
�
#�
#�F��K��I�"�4�[���T�����
�.���-��$3�$B�!�$��9�T�?�*�K��"��",�T�"?�K�&/��&<�29�� �"�5�M��*3�D�/�K�!�S��Y�.�E�
'=���u�
�"+�D�/�K������u�
�'��o��A)�D���__main__)�Console�30rz@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345�abcdefghijklmnopqrstuvwxyz�uRTextualはPythonの高速アプリケーション開発フレームワークですu4アプリケーションは1670万色を使用でき)r�str�returnzIterable[tuple[int, int, str]])T)rr.r�intr�boolr/z	list[int])�31__future__r�re�typingr�_loopr�cellsrr�compiler32rr'�__name__�consoler*�print�rule�r(r�<module>r=s���"�	���'�33�*�*�\�34"��.�4�n�z�� ��B��G��M�M�T�U�	�*�1�2�356�7��B��G��L�L�N��M�M�f�g��L�L�N��M�M�H�I�r(
codekingpro/portable-devtools · Team Ai