HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/self/root/usr/lib/python3/dist-packages/aptsources/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3/dist-packages/aptsources/__pycache__/_deb822.cpython-311.pyc
�

�xkd���dZddlZddlZddlZddlZejd��ZGd�d��ZGd�d��Ze	dkrd	Z
ee
��Zee��dSdS)
z;deb822 parser with support for comment headers and footers.�N�Tc	�p�eZdZdZdefd�Zdedefd�Zdeddfd�Zded	eddfd
�Zde	fd�Z
ejdedej
efd���Zejded
edejeeffd���Z	dded
ej
edejej
eeffd�Zededefd���Zdefd�ZdS)�SectionzcA single deb822 section, possibly with comments.

    This represents a single deb822 section.
    �sectionc�4�ddg}d}d}|�d��D]?}|�d��r|dd�}||xx|dzz
cc<�5d}||dzz
}�@tjt	j|����|_|\|_|_dS)N�F�
�#�T)	�split�
startswith�collections�OrderedDict�apt_pkg�
TagSection�tags�header�footer)�selfr�comments�
in_section�trimmed_section�lines      �4/usr/lib/python3/dist-packages/aptsources/_deb822.py�__init__zSection.__init__s�����8���
����M�M�$�'�'�	+�	+�D����s�#�#�
��A�B�B�x����$�$�$��t��3�$�$�$���J��t�d�{�*�O�O��+�G�,>��,O�,O�P�P��	�#+� ���T�[�[�[��key�returnc��|j|S)zGet the value of a field.�r�rrs  r�__getitem__zSection.__getitem__,s���y��~�rNc��|j|=dS)zDelete a fieldNr r!s  r�__delitem__zSection.__delitem__0s���I�c�N�N�Nr�valc��||j|<dS)zSet the value of a field.Nr )rrr%s   r�__setitem__zSection.__setitem__4s����	�#���rc�*�t|j��S�N)�boolr�rs r�__bool__zSection.__bool__8s���D�I���rc��dSr)�r!s  r�getzSection.get;����r�defaultc��dSr)r.�rrr1s   rr/zSection.get?r0rc�B�	|j|S#t$r|cYSwxYwr))r�KeyErrorr3s   rr/zSection.getCs7��	��9�S�>�!���	�	�	��N�N�N�	���s����contentc�r�|r4d�d�|���D����dzndS)Nr	c3� K�|]	}d|zV��
dS)r
Nr.)�.0rs  r�	<genexpr>z*Section.__comment_lines.<locals>.<genexpr>Ns&����B�B�T�c�D�j�B�B�B�B�B�Brr)�join�
splitlines)r6s r�__comment_lineszSection.__comment_linesKsE���
�D�I�I�B�B�W�-?�-?�-A�-A�B�B�B�B�B�T�I�I��	
rc���|�|j��d�d�|j���D����z|�|j��zS)z+Canonical string rendering of this section.rc3�,K�|]\}}|�d|�d�V��dS)z: r	Nr.)r9�k�vs   rr:z"Section.__str__.<locals>.<genexpr>Ws2����B�B���1��m�m�a�m�m�m�B�B�B�B�B�Br)�_Section__comment_linesrr;r�itemsrr+s r�__str__zSection.__str__Ssd��
� � ���-�-��g�g�B�B��	���0A�0A�B�B�B�B�B�
C��"�"�4�;�/�/�
0�	
rr))�__name__�
__module__�__qualname__�__doc__�strrr"r$r'r*r,�typing�overload�Optionalr/r�Union�staticmethodrBrDr.rrrrs���������
,��,�,�,�,�$�s��s������s��t������s����������$������_��s��v��s�3�����_���_��s��Q��6�<��3��+?�����_��7;�����!'���!3��	��f�o�a�(�#�-�	.������
��
��
�
�
��\�
�
��
�
�
�
�
�
rrc�V�eZdZdZdejfd�Zdeje	fd�Z
defd�ZdS)�FilezC
    Parse a given file object into a list of Section objects.
    �fobjc�v�|����d��}d�|D��|_dS)N�

c�,�g|]}t|����Sr.)r�r9�ss  r�
<listcomp>z!File.__init__.<locals>.<listcomp>cs��6�6�6������6�6�6r)�readr�sections)rrQrYs   rrz
File.__init__as6���9�9�;�;�$�$�V�,�,��6�6�X�6�6�6��
�
�
rrc�*�t|j��Sr))�iterrYr+s r�__iter__z
File.__iter__es���D�M�"�"�"rc�J�d�d�|jD����S)NrSc3�4K�|]}t|��V��dSr))rIrUs  rr:zFile.__str__.<locals>.<genexpr>is(����9�9�a�3�q�6�6�9�9�9�9�9�9r)r;rYr+s rrDzFile.__str__hs%���{�{�9�9�4�=�9�9�9�9�9�9rN)
rErFrGrH�io�
TextIOBaserrJ�Iteratorrr\rIrDr.rrrPrP\sx��������7�R�]�7�7�7�7�#�&�/�'�2�#�#�#�#�:��:�:�:�:�:�:rrP�__main__zV# Header
# More header
K1: V1
# Inline
K2: V2
 # not a comment
# Footer
# More footer
)
rHr_rrJr�TypeVarrrrPrE�strV�printr.rr�<module>rfs���B�A�	�	�	�	�����
�
�
�
������F�N�3����E
�E
�E
�E
�E
�E
�E
�E
�P
:�
:�
:�
:�
:�
:�
:�
:� �z���
�B�	�����A�	�E�!�H�H�H�H�H��r