Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2o�j6
���SSKrSSKrSSKJr \R\"\R5\"\R5--r"SS5r	Sr3g)�N�)�legacy_end_markerc�l�\rSrSr%Sr\\S'\4S\4SjjrSr	\4S5rSrSr
S	rS5rSrSrg
)�6Translator�	z�7>>> Translator('xyz')8Traceback (most recent call last):9...10AssertionError: Invalid separators11 12>>> Translator('')13Traceback (most recent call last):14...15AssertionError: Invalid separators16�sepsc�d�U(a[U5[[5::dS5eXlg)NzInvalid separators)�set�
_default_sepsr)�selfrs  �OD:\code\apps\devtools\python\user_packages\Python313\site-packages\zipp/glob.py�__init__�Translator.__init__s&����D�	�S��%7�7�M�9M�M�7��	�c�`�URURURU555$)z817Given a glob pattern, produce a regex that matches it.18)�extend�19match_dirs�translate_core�r�patterns  r
�	translate�Translator.translates'���{�{�4�?�?�4�+>�+>�w�+G�H�I�Irc��SUS3$)z�20Extend regex for pattern-wide concerns.21 22Apply '(?s:)' to create a non-matching group that23matches newlines (valid on Unix).24 25Append '\z' to imply fullmatch even when match is used.26z(?s:z)\z�rs  r
r�Translator.extend"s���w�i�s�#�#rc��US3$)zl27Ensure that zipfile.Path directory names are matched.28 29zipfile.Path directory names always end in a slash.30z[/]?rrs  r
r�Translator.match_dirs.s���)�4� � rc31��URU5 SR[UR[	URU5555$)z�32Given a glob pattern, produce a regex that matches it.33 34>>> t = Translator()35>>> t.translate_core('*.txt').replace('\\\\', '')36'[^/]*\\.txt'37>>> t.translate_core('a?txt')38'a[^/]txt'39>>> t.translate_core('**/*').replace('\\\\', '')40'.*/[^/][^/]*'41�)�restrict_rglob�join�map�replace�separate�star_not_emptyrs  r
r�Translator.translate_core6s<��	
���G�$��w�w�s�4�<�<��$�2E�2E�g�2N�)O�P�Q�Qrc� �URS5=(dw [R"URS55RSS5RSS[R"UR5S35RSS	5$)42z=43Perform the replacements for a match from :func:`separate`.44r45rz\*\*z.*z\*�[^z]*z\?z[^/])�group�re�escaper#r)r�matchs  r
r#�Translator.replaceEsi���{�{�5�!�46��I�I�e�k�k�!�n�%�
�W�X�u�
%�
�W�U�r�"�)�)�D�I�I�"6�!7�r�:�
;�
�W�U�G�
$�		47rc��S[R"UR5S3n[R"X!5n[	SU55(a[S5eg)z�48Raise ValueError if ** appears in anything but a full path segment.49 50>>> Translator().translate('**foo')51Traceback (most recent call last):52...53ValueError: ** must appear alone in a path segment54�[�]+c3�D# �UHnSU;=(a US:gv� M g7f)z**Nr)�.0�segments  r
�	<genexpr>�,Translator.restrict_rglob.<locals>.<genexpr>[s ���K�(�w�t�w��2�7�d�?�2�(�s� z&** must appear alone in a path segmentN)r*r+r�split�any�55ValueError)rr�seps_pattern�segmentss    r
r �Translator.restrict_rglobPsQ���B�I�I�d�i�i�0�1��4���8�8�L�2���K�(�K�K�K��E�F�F�Lrc�~�SnS[R"UR5S3n[R"X2U5$)z056Ensure that * will not match an empty segment.57c�8�URS5nUS:XaS$U$)Nr�*z?*)r))r,r3s  r
�handle_segment�1Translator.star_not_empty.<locals>.handle_segmentcs ���k�k�!�n�G�"�c�>�4�6�w�6rr(r0)r*r+r�sub)rrr?�not_seps_patterns    r
r%�Translator.star_not_empty^s8��58	7�!����4�9�9�!5� 6�b�9���v�v�&��@�@r)rN)�__name__�59__module__�__qualname__�__firstlineno__�__doc__�str�__annotations__rrrrrrrr#r r%�__static_attributes__rrr
rr	sS��60��I�#0��S��J��	$��	$�!�
R�	61�G�62Arrc�0�[R"SU5$)z�63Separate out character sets to avoid translating their contents.64 65>>> [m.group(0) for m in separate('*.txt')]66['*.txt']67>>> [m.group(0) for m in separate('a[?]txt')]68['a', '[?]', 'txt']69z+([^\[]+)|(?P<set>[\[].*?[\]])|([\[][^\]]*$))r*�finditer)rs r
r$r$ks���;�;�E�w�O�Or)�osr*�compat.py313r�seprI�altsep�boolrrr$rrr
�<module>rSsF��	�	�+�����R�Y�Y��$�r�y�y�/�9�9�
�_A�_A�D	Pr
codekingpro/portable-devtools · Team Ai