PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/zipp/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/zipp/__pycache__/glob.cpython-312.pyc

�

���g����ddlZddlZejeej�eej�zzZGd�d�Zd�Zy)�Nc�V�eZdZUdZeed<efdefd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zy)�
Translatorz�
    >>> Translator('xyz')
    Traceback (most recent call last):
    ...
    AssertionError: Invalid separators

    >>> Translator('')
    Traceback (most recent call last):
    ...
    AssertionError: Invalid separators
    �sepsc�Z�|rt|�tt�ksJd��||_y)NzInvalid separators)�set�
_default_sepsr)�selfrs  �8/opt/hc_python/lib/python3.12/site-packages/zipp/glob.py�__init__zTranslator.__init__s(����D�	�S��%7�7�M�9M�M�7���	�c�`�|j|j|j|���S)zH
        Given a glob pattern, produce a regex that matches it.
        )�extend�
match_dirs�translate_core�r	�patterns  r
�	translatezTranslator.translates'���{�{�4�?�?�4�+>�+>�w�+G�H�I�Irc��d|�d�S)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
rzTranslator.extend s���w�i�s�#�#rc��|�d�S)z�
        Ensure that zipfile.Path directory names are matched.

        zipfile.Path directory names always end in a slash.
        z[/]?rrs  r
rzTranslator.match_dirs+s���)�4� � rc
��|j|�djt|jt	|j|����S)a?
        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
rzTranslator.translate_core3s<��	
���G�$��w�w�s�4�<�<��$�2E�2E�g�2N�)O�P�Q�Qrc��|jd�xsutj|jd��jdd�jddtj|j��d��jdd	�S)
zM
        Perform the replacements for a match from :func:`separate`.
        rrz\*\*z.*z\*�[^z]*z\?z[^/])�group�re�escaperr)r	�matchs  r
rzTranslator.replaceBsi���{�{�5�!�
��I�I�e�k�k�!�n�%�
�W�X�u�
%�
�W�U�r�"�)�)�D�I�I�"6�!7�r�:�
;�
�W�U�G�
$�		
rc��dtj|j��d�}tj||�}t	d�|D��rtd��y)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�2K�|]}d|vxr|dk7���y�w)z**Nr)�.0�segments  r
�	<genexpr>z,Translator.restrict_rglob.<locals>.<genexpr>Xs!����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
rzTranslator.restrict_rglobMsP���B�I�I�d�i�i�0�1��4���8�8�L�'�2���K�(�K�K��E�F�F�Lrc�|�d�}dtj|j��d�}tj|||�S)z@
        Ensure that * will not match an empty segment.
        c�6�|jd�}|dk(rdS|S)Nr�*z?*)r!)r$r*s  r
�handle_segmentz1Translator.star_not_empty.<locals>.handle_segment`s ���k�k�!�n�G�"�c�>�4�6�w�6rr r')r"r#r�sub)r	rr4�not_seps_patterns    r
rzTranslator.star_not_empty[s:��
	7�!����4�9�9�!5� 6�b�9���v�v�&���@�@rN)�__name__�
__module__�__qualname__�__doc__�str�__annotations__rrrrrrrrrrrr
rrsD��
��I�#0��S��J�	$�!�
R�	
�G�
Arrc�.�tjd|�S)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
rrhs���;�;�E�w�O�Or)	�osr"�sepr;�altsep�boolrrrrrr
�<module>rCsC��	�	�����R�Y�Y��$�r�y�y�/�9�9�
�^A�^A�B	Pr

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic