Your IP : 3.142.241.200


Current Path : /opt/alt/python313/lib64/python3.13/zipfile/_path/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/zipfile/_path/__pycache__/glob.cpython-313.opt-1.pyc

�

+}g����SSKrSSKr\R\"\R5\"\R5--r"SS5rSrg)�Nc�b�\rSrSr%Sr\\S'\4S\4SjjrSr	Sr
SrSrS	r
S
rSrSrg
)�
Translator�z�
>>> Translator('xyz')
Traceback (most recent call last):
...
AssertionError: Invalid separators

>>> Translator('')
Traceback (most recent call last):
...
AssertionError: Invalid separators
�sepsc��Xlg)N�r)�selfrs  �9/opt/alt/python313/lib64/python3.13/zipfile/_path/glob.py�__init__�Translator.__init__s���	�c�`�URURURU555$)z8
Given a glob pattern, produce a regex that matches it.
)�extend�
match_dirs�translate_core�r	�patterns  r
�	translate�Translator.translates'���{�{�4�?�?�4�+>�+>�w�+G�H�I�Ir
c��SUS3$)z�
Extend regex for pattern-wide concerns.

Apply '(?s:)' to create a non-matching group that
matches newlines (valid on Unix).

Append '\Z' to imply fullmatch even when match is used.
z(?s:z)\Z�rs  r
r�Translator.extend!s���w�i�s�#�#r
c��US3$)zl
Ensure that zipfile.Path directory names are matched.

zipfile.Path directory names always end in a slash.
z[/]?rrs  r
r�Translator.match_dirs,s���)�4� � r
c
��URU5 SR[UR[	URU5555$)z�
Given a glob pattern, produce a regex that matches it.

>>> t = Translator()
>>> t.translate_core('*.txt').replace('\\\\', '')
'[^/]*\\.txt'
>>> t.translate_core('a?txt')
'a[^/]txt'
>>> t.translate_core('**/*').replace('\\\\', '')
'.*/[^/][^/]*'
�)�restrict_rglob�join�map�replace�separate�star_not_emptyrs  r
r�Translator.translate_core4s<��	
���G�$��w�w�s�4�<�<��$�2E�2E�g�2N�)O�P�Q�Qr
c� �URS5=(dw [R"URS55RSS5RSS[R"UR5S35RSS	5$)
z=
Perform the replacements for a match from :func:`separate`.
�setrz\*\*z.*z\*�[^z]*z\?z[^/])�group�re�escaper r)r	�matchs  r
r �Translator.replaceCsi���{�{�5�!�
��I�I�e�k�k�!�n�%�
�W�X�u�
%�
�W�U�r�"�)�)�D�I�I�"6�!7�r�:�
;�
�W�U�G�
$�		
r
c��S[R"UR5S3n[R"X!5n[	SU55(a[S5eg)z�
Raise ValueError if ** appears in anything but a full path segment.

>>> Translator().translate('**foo')
Traceback (most recent call last):
...
ValueError: ** must appear alone in a path segment
�[�]+c3�D# �UHnSU;=(a US:gv� M g7f)z**Nr)�.0�segments  r
�	<genexpr>�,Translator.restrict_rglob.<locals>.<genexpr>Ys ���K�(�w�t�w��2�7�d�?�2�(�s� z&** must appear alone in a path segmentN)r(r)r�split�any�
ValueError)r	r�seps_pattern�segmentss    r
r�Translator.restrict_rglobNsQ���B�I�I�d�i�i�0�1��4���8�8�L�2���K�(�K�K�K��E�F�F�Lr
c�~�SnS[R"UR5S3n[R"X2U5$)z0
Ensure that * will not match an empty segment.
c�8�URS5nUS:XaS$U$)Nr�*z?*)r')r*r1s  r
�handle_segment�1Translator.star_not_empty.<locals>.handle_segmentas ���k�k�!�n�G�"�c�>�4�6�w�6r
r&r.)r(r)r�sub)r	rr=�not_seps_patterns    r
r"�Translator.star_not_empty\s8��
	7�!����4�9�9�!5� 6�b�9���v�v�&��@�@r
rN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�str�__annotations__�
_default_sepsrrrrrr rr"�__static_attributes__rr
r
rrsD��
��I�#0��S��J�	$�!�
R�	
�G�
Ar
rc�0�[R"SU5$)z�
Separate out character sets to avoid translating their contents.

>>> [m.group(0) for m in separate('*.txt')]
['*.txt']
>>> [m.group(0) for m in separate('a[?]txt')]
['a', '[?]', 'txt']
z+([^\[]+)|(?P<set>[\[].*?[\]])|([\[][^\]]*$))r(�finditer)rs r
r!r!is���;�;�E�w�O�Or
)	�osr(�seprG�altsep�boolrIrr!rr
r
�<module>rQsE��	�	�����R�Y�Y��$�r�y�y�/�9�9�
�^A�^A�B	Pr

?>