%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/debian/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/debian/__pycache__/_util.cpython-312.pyc

�

Cf�c�4����ddlZddlmZ	ddlmZmZmZmZmZmZm	Z	m
Z
mZmZe	d�Z
d�ZGd�de�ZeZd	�ZGd
�dee
�ZGd�d
ee
�ZGd�de�Zy#e$rdZ
Y�DwxYw)�N)�
ReferenceType)
�Iterable�Optional�Generic�Dict�List�Iterator�TypeVar�
TYPE_CHECKING�Any�Callable�TFc��|�|�SdS�N�)�refs �./usr/lib/python3/dist-packages/debian/_util.py�resolve_refrs���O�3�5�-��-�c�J��eZdZdZdgZer�fd�Zd�Zd�Zd�Z	d�Z
d�Z�xZS)	�_CaseInsensitiveStringzCase insensitive string.
    �	str_lowerc�:��tt|�|�d|_y)N�)�superr�__init__r)�self�s�	__class__s  �rrz_CaseInsensitiveString.__init__s����(�$�8��;��D�Nrc�\�tj||�}|j�|_|Sr)�str�__new__�lowerr)�cls�str_rs   rr"z_CaseInsensitiveString.__new__#s$���K�K��T�"���j�j�l����rc�,�t|j�Sr)�hashr�rs r�__hash__z_CaseInsensitiveString.__hash__)s���D�N�N�#�#rc�\�	|j|j�k(S#t$rYywxYw)NF)rr#�AttributeError�r�others  r�__eq__z_CaseInsensitiveString.__eq__-s.��	��>�>�U�[�[�]�2�2���	��	�s��	+�+c��||k(Srrr,s  r�__ne__z_CaseInsensitiveString.__ne__4s���5�=� � rc��|jSr)rr(s rr#z_CaseInsensitiveString.lower8s���~�~�r)
�__name__�
__module__�__qualname__�__doc__�	__slots__rrr"r)r.r0r#�
__classcell__)rs@rrrs0�����
�I��	 �
�$��!�rrc�"�|j�Sr)r#)�xs r�default_field_sort_keyr:@s���7�7�9�rc��eZdZdZd�Zed��Zejd��Zd�Zdd�d�Z	dd�d	�Z
ed
��Zed��Z
d�Zd
�Zy)�LinkedListNode)�_previous_node�value�	next_node�__weakref__c�.�d|_d|_||_yr)r=r?r>�rr>s  rrzLinkedListNode.__init__Is��"��������
rc�,�t|j�Sr)rr=r(s r�
previous_nodezLinkedListNode.previous_nodeOs���4�.�.�/�/rc�L�|�tj|�|_yd|_yr)�weakrefrr=�r�nodes  rrDzLinkedListNode.previous_nodeTs!��48�3C�g�k�k�$�/�����rc��tj|j|j�d|_d|_|jSr)r<�
link_nodesrDr?r>r(s r�removezLinkedListNode.removeYs5���!�!�$�"4�"4�d�n�n�E�!�������z�z�rF)�skip_currentc#�XK�|r|jn|}|r|��|j}|r�yy�wr)r?�rrLrHs   r�	iter_nextzLinkedListNode.iter_next`s+����".�t�~�~�4����J��>�>�D����%*�*c#�XK�|r|jn|}|r|��|j}|r�yy�wr)rDrNs   r�
iter_previouszLinkedListNode.iter_previousis/����&2�t�!�!�t����J��%�%�D��rPc�*�|r||_|r||_yyr�rDr?rTs  rrJzLinkedListNode.link_nodesrs���&3�I�#��&/�M�#�rc�\�tj||�tj||�yr)r<rJ)�
first_node�new_node�	last_nodes   r�_insert_linkzLinkedListNode._insert_linkzs$��	�!�!�*�h�7��!�!�(�I�6rc�n�||ur||jusJ�tj|j||�yr)rDr<rY�rrWs  r�
insert_beforezLinkedListNode.insert_before�s5���8�#���8J�8J�(J�J�J��#�#�D�$6�$6��$�Grc�n�||ur||jusJ�tj|||j�yr)r?r<rYr[s  r�insert_afterzLinkedListNode.insert_after�s1���8�#�����(F�F�F��#�#�D�(�D�N�N�CrN)r2r3r4r6r�propertyrD�setterrKrOrR�staticmethodrJrYr\r^rrrr<r<Es���G�I���0��0����N��N�� %�"�$)�&��0��0��7��7�H�
Drr<c��eZdZdZdZdd�Zd�Zd�Zed��Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�
LinkedListavSpecialized linked list implementation to support the deb822 parser needs

    We deliberately trade "encapsulation" for features needed by this library
    to facilitate their implementation.  Notably, we allow nodes to leak and assume
    well-behaved calls to remove_node - because that makes it easier to implement
    components like Deb822InvalidParagraphElement.
    ��	head_node�	tail_node�_sizeNc�V�d|_d|_d|_|�|j|�yy�Nr)rerfrg�extend)r�valuess  rrzLinkedList.__init__�s.����������
����K�K���rc��|jduSr)rer(s r�__bool__zLinkedList.__bool__�s���~�~�T�)�)rc��|jSr)rgr(s r�__len__zLinkedList.__len__�s���z�z�rc�J�|j�|jjSdSr)rfr>r(s r�tailzLinkedList.tail�s"��(,�~�~�'A�t�~�~�#�#�K�t�Krc�h�|j�td��|j|j�y)Nzpop from empty list)rf�
IndexError�remove_noder(s r�popzLinkedList.pop�s*���>�>�!��2�3�3�������(rc#�^K�|j}|�y|j�Ed{���y7��wr)rerO)rres  r�
iter_nodeszLinkedList.iter_nodes�s*�����N�N�	�����&�&�(�(�(�s�#-�+�-c#�NK�d�|j�D�Ed{���y7��w)Nc3�4K�|]}|j���y�wr�r>)�.0rHs  r�	<genexpr>z&LinkedList.__iter__.<locals>.<genexpr>�s����=�4�D�J�J�=���)rwr(s r�__iter__zLinkedList.__iter__�s����=�4�?�?�+<�=�=�=�s�%�#�%c#�lK�|j}|�yd�|j�D�Ed{���y7��w)Nc3�4K�|]}|j���y�wrrz)r{�ns  rr|z*LinkedList.__reversed__.<locals>.<genexpr>�s����?��A�G�G�?�r})rfrR)rrfs  r�__reversed__zLinkedList.__reversed__�s/�����N�N�	����?�Y�%<�%<�%>�?�?�?�s�*4�2�4c�0�||jur%|j|_|j�5d|_n-||jur|j|_|j�J�|jdkDsJ�|xjdzc_|j�y)Nr�)rer?rfrDrgrKrGs  rrtzLinkedList.remove_node�s{���4�>�>�!�!�^�^�D�N��~�~�%�!%���
�T�^�^�
#�!�/�/�D�N��>�>�-�-�-��z�z�A�~��~��
�
�a��
����
rc�t�|j�|j|�S|j||j�Sr)re�appendr\rBs  r�insert_at_headzLinkedList.insert_at_head�s2���>�>�!��;�;�u�%�%��!�!�%����8�8rc�
�t|�}|j�||_||_nG|j�J�|j|usJ�|j|_||j_||_|xj
dz
c_|S)Nr�)r<rerfrDr?rg)rr>rHs   rr�zLinkedList.append�s{���e�$���>�>�!�!�D�N�!�D�N��>�>�-�-�-��>�>��-�-�-�!%���D��'+�D�N�N�$�!�D�N��
�
�a��
��rc�8�|jt|�|�Sr)�insert_node_beforer<�rr>�
existing_nodes   rr\zLinkedList.insert_before�s���&�&�~�e�'<�m�L�Lrc�8�|jt|�|�Sr)�insert_node_afterr<r�s   rr^zLinkedList.insert_after�s���%�%�n�U�&;�]�K�Krc���|j�td��|j�|j�td��|j	|�||jur||_|xj
dz
c_|S�Nz,List is empty; node argument cannot be validz&New node must not already be inserted!r�)re�
ValueErrorr?rDr\rg�rrWr�s   rr�zLinkedList.insert_node_before�sn���>�>�!��K�L�L����)�X�-C�-C�-O��E�F�F��#�#�H�-��D�N�N�*�%�D�N��
�
�a��
��rc���|j�td��|j�|j�td��|j	|�||jur||_|xj
dz
c_|Sr�)rfr�r?rDr^rgr�s   rr�zLinkedList.insert_node_aftersn���>�>�!��K�L�L����)�X�-C�-C�-O��E�F�F��"�"�8�,��D�N�N�*�%�D�N��
�
�a��
��rc�4�|D]}|j|��yr)r�)rrk�vs   rrjzLinkedList.extends���	�A��K�K��N�	rc�.�d|_d|_d|_yrirdr(s r�clearzLinkedList.clears����������
rr)r2r3r4r5r6rrmror_rqrurwr~r�rtr�r�r\r^r�r�rjr�rrrrcrc�sw���4�I� �*���L��L�)�)�>�@�
�9��&M�L�
�
��
rrcc�d�eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
eZd
�Zd�Z
d�Zd
�Zd�Zd�Zy)�
OrderedSetz�A set-like object that preserves order when iterating over it

    We use this to keep track of keys in Deb822Dict, because it's much faster
    to look up if a key is in a set than in a list.
    Nc�h�i|_t�|_|�g}|D]}|j|��yr)�_OrderedSet__tablerc�_OrderedSet__order�add�r�iterable�items   rrzOrderedSet.__init__!s9�����!�|������H��	�D��H�H�T�N�	rc��||vr,|jj|�}	||j|<yy#t$r|jj	|��wxYwr)r�r�r��	Exceptionrt�rr�rHs   rr�zOrderedSet.add/s^���t��
�<�<�&�&�t�,�D�
�%)����T�"����
����(�(��.��
�s	�2�&Ac�r�|j|}|j|=|jj|�yr)r�r�rtr�s   rrKzOrderedSet.remove=s0���|�|�D�!���L�L������ � ��&rc�,�t|j�Sr)�iterr�r(s rr~zOrderedSet.__iter__Es���D�L�L�!�!rc�>�tt|j��Sr)r��reversedr�r(s rr�zOrderedSet.__reversed__Js���H�T�\�\�*�+�+rc�,�t|j�Sr)�lenr�r(s rrozOrderedSet.__len__Os���4�<�<� � rc��||jvSr)r��rr�s  r�__contains__zOrderedSet.__contains__Ss���t�|�|�#�#rc�4�|D]}|j|��yr)r�r�s   rrjzOrderedSet.extend\s���	�D��H�H�T�N�	rc�P�|j||jj�y)z2Re-order the given item so it is "last" in the setN)�_reorderr�r�r�s  r�
order_lastzOrderedSet.order_lastbs��	
�
�
�d�D�L�L�/�/�0rc�P�|j||jj�y)z3Re-order the given item so it is "first" in the setN)r�r�r�r�s  r�order_firstzOrderedSet.order_firstgs��	
�
�
�d�D�L�L�7�7�8rc�r���||k(rtd���j|��j|��fd��y)zTRe-order the given item so appears directly after the reference item in the sequence�*Cannot re-order an item relative to itselfc�<���jj|��Sr)r�r\�r9�reference_noders ��r�<lambda>z)OrderedSet.order_before.<locals>.<lambda>rs���d�l�l�&@�&@��N�&S�rN�r�r�r��rr��reference_itemr�s`  @r�order_beforezOrderedSet.order_beforels6����>�!��I�J�J����n�5���
�
�d�S�Trc�r���||k(rtd���j|��j|��fd��y)zURe-order the given item so appears directly before the reference item in the sequencer�c�<���jj|��Sr)r�r^r�s ��rr�z(OrderedSet.order_after.<locals>.<lambda>zs���d�l�l�&?�&?��>�&R�rNr�r�s`  @r�order_afterzOrderedSet.order_afterts6����>�!��I�J�J����n�5���
�
�d�R�Src��|j|}|jj|�||j�}||j|<yr)r�r�rtr>)rr��
reinserterrHrWs     rr�zOrderedSet._reorder|s@��
�|�|�D�!����� � ��&��d�j�j�)��%����T�rr)r2r3r4r5rr�rKr~r�ror�r�rjr�r�r�r�r�rrrr�r�sQ�����'�"�
,�
!�$��F��1�
9�
U�T�&rr�)rFr�typingrrrrrr	r
rrr
r�ImportErrorrr!r�_strIr:r<rc�objectr�rrr�<module>r�s����!�����	���A�.�
#�S�#�L	���
FD�W�Q�Z�FD�RI����I�Xj&��j&��Y���M��s� A'�'A1�0A1

Zerion Mini Shell 1.0