§
    ­xkd  ã                   ó¾   — d Z ddlZddlZddlZddlZ ej        d¦  «        Z G d„ d¦  «        Z G d„ d¦  «        Ze	dk    rd	Z
 ee
¦  «        Z ee¦  «         dS dS )
z;deb822 parser with support for comment headers and footers.é    NÚTc            	       óp  — e Zd ZdZdefd„Zdedefd„Zdeddfd„Zded	eddfd
„Zde	fd„Z
ej        dedej        e         fd„¦   «         Zej        dededej        eef         fd„¦   «         Z	 ddedej        e         dej        ej        e         ef         fd„Zededefd„¦   «         Zdefd„ZdS )ÚSectionzcA single deb822 section, possibly with comments.

    This represents a single deb822 section.
    Úsectionc                 ó4  — ddg}d}d}|                      d¦  «        D ]?}|                     d¦  «        r|dd …         }||xx         |dz   z  cc<   Œ5d}||dz   z  }Œ@t          j        t	          j        |¦  «        ¦  «        | _        |\  | _        | _        d S )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__zSection.__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 )zGet the value of a field.©r   ©r   r   s     r   Ú__getitem__zSection.__getitem__,   s   € àŒy˜Œ~Ðr   Nc                 ó   — | j         |= dS )zDelete a fieldNr    r!   s     r   Ú__delitem__zSection.__delitem__0   s   € àŒI�cˆNˆNˆNr   Úvalc                 ó   — || j         |<   dS )zSet the value of a field.Nr    )r   r   r%   s      r   Ú__setitem__zSection.__setitem__4   s   € àˆŒ	�#‰ˆˆr   c                 ó*   — t          | j        ¦  «        S ©N)Úboolr   ©r   s    r   Ú__bool__zSection.__bool__8   s   € Ý�D”I‰ŒÐr   c                 ó   — d S r)   © r!   s     r   ÚgetzSection.get;   ó   € àˆr   Údefaultc                 ó   — d S r)   r.   ©r   r   r1   s      r   r/   zSection.get?   r0   r   c                 óB   — 	 | j         |         S # t          $ r |cY S w xY wr)   )r   ÚKeyErrorr3   s      r   r/   zSection.getC   s7   € ð	Ø”9˜S”>Ð!øÝð 	ð 	ð 	ØˆNˆNˆNð	øøøs   ‚ ��Úcontentc                 ór   — | r4d                      d„ |                      ¦   «         D ¦   «         ¦  «        dz   ndS )Nr	   c              3   ó    K  — | ]	}d |z   V — Œ
dS )r
   Nr.   )Ú.0r   s     r   ú	<genexpr>z*Section.__comment_lines.<locals>.<genexpr>N   s&   è è € ÐBÐB T�c˜D‘jÐBÐBÐBÐBÐBÐBr   r   )ÚjoinÚ
splitlines)r6   s    r   Ú__comment_lineszSection.__comment_linesK   sE   € ð ðˆD�IŠIÐBÐB¨W×-?Ò-?Ñ-AÔ-AÐBÑBÔBÑBÔBÀTÑIÐIàð	
r   c                 óÚ   — |                       | j        ¦  «        d                     d„ | j                             ¦   «         D ¦   «         ¦  «        z   |                       | j        ¦  «        z   S )z+Canonical string rendering of this section.r   c              3   ó,   K  — | ]\  }}|› d |› d�V — ŒdS )z: r	   Nr.   )r9   ÚkÚvs      r   r:   z"Section.__str__.<locals>.<genexpr>W   s2   è è € ÐBÐB©¨¨1˜�m�m˜a�m�m�mÐBÐBÐBÐBÐBÐBr   )Ú_Section__comment_linesr   r;   r   Úitemsr   r+   s    r   Ú__str__zSection.__str__S   sd   € ð × Ò  ¤Ñ-Ô-Ø�gŠgÐBÐB°´	·²Ñ0AÔ0AÐBÑBÔBÑBÔBñCà×"Ò" 4¤;Ñ/Ô/ñ0ð	
r   r)   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   r"   r$   r'   r*   r,   ÚtypingÚoverloadÚOptionalr/   r   ÚUnionÚstaticmethodrB   rD   r.   r   r   r   r      sÓ  € € € € € ðð ð
, ð ,ð ,ð ,ð ,ð$˜sð  sð ð ð ð ð˜sð  tð ð ð ð ð˜sð ¨ð °ð ð ð ð ð˜$ð ð ð ð ð „_ð�sð ˜vœ¨sÔ3ð ð ð ñ „_ðð „_ð�sð  Qð ¨6¬<¸¸3¸Ô+?ð ð ð ñ „_ðð 7;ðð ØðØ!'¤°Ô!3ðà	Œ�f”o aÔ(¨#Ð-Ô	.ðð ð ð ð ð
 ð 
¨ð 
ð 
ð 
ñ „\ð
ð
˜ð 
ð 
ð 
ð 
ð 
ð 
r   r   c                   óV   — e Zd ZdZdej        fd„Zdej        e	         fd„Z
defd„ZdS )ÚFilezC
    Parse a given file object into a list of Section objects.
    Úfobjc                 óv   — |                      ¦   «                              d¦  «        }d„ |D ¦   «         | _        d S )Nú

c                 ó,   — g | ]}t          |¦  «        ‘ŒS r.   )r   ©r9   Úss     r   ú
<listcomp>z!File.__init__.<locals>.<listcomp>c   s   € Ð6Ð6Ð6¨� ™œÐ6Ð6Ð6r   )Úreadr   Úsections)r   rQ   rY   s      r   r   zFile.__init__a   s6   € Ø—9’9‘;”;×$Ò$ VÑ,Ô,ˆØ6Ð6¨XÐ6Ñ6Ô6ˆŒˆˆr   r   c                 ó*   — t          | j        ¦  «        S r)   )ÚiterrY   r+   s    r   Ú__iter__zFile.__iter__e   s   € Ý�D”MÑ"Ô"Ð"r   c                 óJ   — d                      d„ | j        D ¦   «         ¦  «        S )NrS   c              3   ó4   K  — | ]}t          |¦  «        V — Œd S r)   )rI   rU   s     r   r:   zFile.__str__.<locals>.<genexpr>i   s(   è è € Ð9Ð9 a�3˜q™6œ6Ð9Ð9Ð9Ð9Ð9Ð9r   )r;   rY   r+   s    r   rD   zFile.__str__h   s%   € Ø�{Š{Ð9Ð9¨4¬=Ð9Ñ9Ô9Ñ9Ô9Ð9r   N)rE   rF   rG   rH   ÚioÚ
TextIOBaser   rJ   ÚIteratorr   r\   rI   rD   r.   r   r   rP   rP   \   sx   € € € € € ðð ð7˜Rœ]ð 7ð 7ð 7ð 7ð#˜&œ/¨'Ô2ð #ð #ð #ð #ð:˜ð :ð :ð :ð :ð :ð :r   rP   Ú__main__zV# Header
# More header
K1: V1
# Inline
K2: V2
 # not a comment
# Footer
# More footer
)rH   r_   r   rJ   r   ÚTypeVarr   r   rP   rE   ÚstrV   Úprintr.   r   r   ú<module>rf      sÝ   ðð BÐ Aà 	€	€	€	Ø Ð Ð Ð Ø €€€à €€€ð €F„N�3ÑÔ€ðE
ð E
ð E
ð E
ð E
ñ E
ô E
ð E
ðP:ð :ð :ð :ð :ñ :ô :ð :ð  ˆzÒÐð
€Bð 	ˆ�‰Œ€Aà	€Eˆ!�H„H€H€H€Hð Ðr   