
    k7iE	                     6   % S r SSKrSSKJr  SSKJr  SSKJrJrJ	r	  SSK
Jr  \R                  " SR                  \R                  " S	R                  \\	-   5      5      5      \R                   5      r\\S
'   S\SS4S jrS	/ SS4S\S\S\\   S\S\S\4S jjrg)zA
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
    N)Sequence)Final   )ascii_symbolsto_strunprintable_ascii_chars)InvalidCharError[{}] __RE_SYMBOLtextreturnc                 j    [         R                  [        U 5      5      nU(       a  [        SU 35      eg)z
Verifying whether symbol(s) included in the ``text`` or not.

Args:
    text:
        Input text to validate.

Raises:
    ValidationError (ErrorReason.INVALID_CHARACTER):
        If symbol(s) included in the ``text``.
zinvalid symbols found: N)r   findallr   r	   )r   
match_lists     N/home/james-whalen/.local/lib/python3.13/site-packages/pathvalidate/_symbol.pyvalidate_symbolr      s3     $$VD\2J!8EFF     Freplacement_textexclude_symbolsis_replace_consecutive_charsis_stripc                 &   U(       ax  [         R                  " SR                  [         R                  " SR	                  [        [        [        -   5      [        U5      -
  5      5      5      [         R                  5      nO[        n UR                  U[        U 5      5      nU(       d  U$ U(       a.  [         R                  " [         R                  " U5       S3X5      nU(       a  UR                  U5      nU$ ! [         a    [        S5      ef = f)a  
Replace all of the symbols in the ``text``.

Args:
    text:
        Input text.
    replacement_text:
        Replacement text.
    exclude_symbols:
        Symbols that were excluded from the replacement.
    is_replace_consecutive_chars:
        If |True|, replace consecutive multiple ``replacement_text`` characters
        to a single character.
    is_strip:
        If |True|, strip ``replacement_text`` from the beginning/end of the replacement text.

Returns:
    A replacement string.

Example:

    :ref:`example-sanitize-symbol`
r
   r   ztext must be a string+)recompileformatescapejoinsetr   r   UNICODEr   subr   	TypeErrorstrip)r   r   r   r   r   regexpnew_texts          r   replace_symbolr'   $   s    > MM		GGC0G GH3K__`
 JJ
 1::.t= #66RYY'789;=MX>>"23O  1/001s   C: :D)__doc__r   collections.abcr   typingr   _commonr   r   r   errorr	   r   r   r   r   r!   r   __annotations__strr   boolr'    r   r   <module>r1      s    
 $  C C # ZZ
MM"))BGGM4K$KLMNPRPZPZU 
G# G$ G( %').9
99 c]9 #'	9
 9 	9r   