관리-도구
편집 파일: utils.cpython-311.pyc
� �܋f � �� � d Z ddlZddlZddlmZmZ ddlmZmZm Z ej e� � Z ej d� � Zdedefd�Zd ed edee eef fd�Zded edefd�Zdedefd�ZdS )zGeneral shared utilities.� N)�tee�zip_longest)�Any�Iterable�Tuplez[\W_]+�string�returnc �, � | � � � S )z5Return True iff the string contains only whitespaces.)�strip�r s �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pydocstyle/utils.py�is_blankr s � ��|�|�~�~��� �iterable� default_valuec �j � t | � � \ }}t ||� � }t |||�� � S )ztReturn pairs of items from `iterable`. pairwise([1, 2, 3], default_value=None) -> (1, 2) (2, 3), (3, None) )� fillvalue)r �nextr )r r �a�b�_s r �pairwiser s7 � � �x�=�=�D�A�q��Q� ���A��q�!�}�5�5�5�5r r r c � � t t | |� � � � D ]\ }\ }}||k r|c S �t t | � � t |� � � � S )ztReturn the length of the longest common prefix of a and b. >>> common_prefix_length('abcd', 'abce') 3 )� enumerate�zip�min�len)r r �common�ca�cbs r �common_prefix_lengthr! s_ � � &�c�!�Q�i�i�0�0� � �����R� ��8�8��M�M�M� ��s�1�v�v�s�1�v�v���r c �8 � t � d| � � S )z2Strip string from any non-alphanumeric characters.� )�NON_ALPHANUMERIC_STRIP_RE�subr s r �strip_non_alphanumericr&