
    c              	           d Z ddlZddlZddlmZmZ ddlmZmZm	Z	  ej
        e          Z ej        d          ZdedefdZd	ed
edee	eef                  fdZdededefdZdedefdZdS )zGeneral shared utilities.    N)teezip_longest)AnyIterableTuplez[\W_]+stringreturnc                 ,    |                                   S )z5Return True iff the string contains only whitespaces.)stripr   s    0lib/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==DAq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!       sb     &c!Qii00  R8 	MMM	s1vvs1vvr   c                 8    t                               d|           S )z2Strip string from any non-alphanumeric characters. )NON_ALPHANUMERIC_STRIP_REsubr   s    r   strip_non_alphanumericr&   -   s    $((V444r   )__doc__loggingre	itertoolsr   r   typingr   r   r   	getLogger__name__logcompiler$   strboolr   r   intr!   r&    r   r   <module>r4      s-      				 & & & & & & & & ' ' ' ' ' ' ' ' ' ' g!! 'BJy11 S T    

6
6
6 eCHo
6 
6 
6 
6
C 
C 
C 
 
 
 
53 53 5 5 5 5 5 5r   