Ë
    + ƒh?  ã                   ó¤   — 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«       yy)
z;deb822 parser with support for comment headers and footers.é    NÚTc                   ó†  — e Zd ZU dZej
                  eef   ed<   eeef   ed<   eed<   eed<   de	j                  ed f   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dz  fd„«       Ze	j"                  deded	eez  fd„«       Zddededz  d	edz  ez  fd„Zeded	efd„«       Zd	efd„Zy)ÚSectionzcA single deb822 section, possibly with comments.

    This represents a single deb822 section.
    ÚtagsÚ_case_mappingÚheaderÚfooterÚsectionc                 ó”  — t        |t        «      rut        j                  |j                  «      | _        | j                  D �ci c]  }|j                  «       |“Œ c}| _        |j                  | _        |j                  | _        y ddg}d}d}|j                  d«      D ]3  }|j                  d«      r|dd  }||xx   |dz   z  cc<   Œ*d}||dz   z  }Œ5 t        j                  t        j                  |«      «      | _        | j                  D �ci c]  }|j                  «       |“Œ c}| _        |\  | _        | _        y c c}w c c}w )NÚ Fú
ú#é   T)Ú
isinstancer   ÚcollectionsÚOrderedDictr   Úcasefoldr   r   r	   ÚsplitÚ
startswithÚapt_pkgÚ
TagSection)Úselfr
   ÚkÚcommentsÚ
in_sectionÚtrimmed_sectionÚlines          ú4/usr/lib/python3/dist-packages/aptsources/_deb822.pyÚ__init__zSection.__init__   s"  € Ü�gœwÔ'Ü#×/Ñ/°·±Ó=ˆDŒIØ;?¿9¹9Ö!E°a !§*¡*£,°¡/Ò!EˆDÔØ!Ÿ.™.ˆDŒKØ!Ÿ.™.ˆDŒKØà˜�8ˆØˆ
Øˆà—M‘M $Ó'ò 	+ˆDØ�‰˜sÔ#à˜A˜B�x�Ø˜Ó$¨¨t©Ñ3Ó$ØàˆJØ˜t d™{Ñ*‰Oð	+ô  ×+Ñ+¬G×,>Ñ,>¸Ó,OÓPˆŒ	Ø7;·y±yÖA°!˜aŸj™j›l¨A™oÒAˆÔØ#+Ñ ˆŒ�T•[ùò+ "Fùò( Bs   ÁE ÄEÚkeyÚreturnc                 óp   — | j                   | j                  j                  |j                  «       |«         S )zGet the value of a field.©r   r   Úgetr   ©r   r    s     r   Ú__getitem__zSection.__getitem__7   s*   € à�y‰y˜×+Ñ+×/Ñ/°·±³ÀÓDÑEÐEó    Nc                 ón   — | j                   | j                  j                  |j                  «       |«      = y)zDelete a fieldNr#   r%   s     r   Ú__delitem__zSection.__delitem__;   s'   € à�I‰I�d×(Ñ(×,Ñ,¨S¯\©\«^¸SÓAÑBr'   Úvalc                 óÊ   — |j                  «       | j                  vr|| j                  |j                  «       <   || j                  | j                  |j                  «          <   y)zSet the value of a field.N)r   r   r   )r   r    r*   s      r   Ú__setitem__zSection.__setitem__?   sK   € à�<‰<‹> ×!3Ñ!3Ñ3Ø14ˆD×Ñ˜sŸ|™|›~Ñ.Ø8;ˆ�	‰	�$×$Ñ$ S§\¡\£^Ñ4Ò5r'   c                 ó,   — t        | j                  «      S ©N)Úboolr   ©r   s    r   Ú__bool__zSection.__bool__E   s   € Ü�D—I‘I‹Ðr'   c                  ó   — y r.   © r%   s     r   r$   zSection.getH   ó   € àr'   Údefaultc                  ó   — y r.   r3   ©r   r    r5   s      r   r$   zSection.getL   r4   r'   c                 ó0   — 	 | |   S # t         $ r |cY S w xY wr.   )ÚKeyErrorr7   s      r   r$   zSection.getP   s%   € ð	Ø˜‘9ÐøÜò 	ØŠNð	ús   ‚ ‡”Úcontentc                 ó\   — | r)dj                  d„ | j                  «       D «       «      dz   S dS )Nr   c              3   ó&   K  — | ]	  }d |z   –— Œ y­w)r   Nr3   )Ú.0r   s     r   ú	<genexpr>z*Section.__comment_lines.<locals>.<genexpr>Y   s   è ø€ ÒB T�c˜D•jÑBùs   ‚r   )ÚjoinÚ
splitlines)r:   s    r   Ú__comment_lineszSection.__comment_linesV   s8   € ñ ð �I‰IÑB¨W×-?Ñ-?Ó-AÔBÓBÀTÑIð	
ð ð	
r'   c                 óÒ   — | j                  | j                  «      dj                  d„ | j                  j	                  «       D «       «      z   | j                  | j
                  «      z   S )z+Canonical string rendering of this section.r   c              3   ó2   K  — | ]  \  }}|› d |› d�–— Œ y­w)z: r   Nr3   )r=   r   Úvs      r   r>   z"Section.__str__.<locals>.<genexpr>b   s    è ø€ ÒB©¨¨1˜˜˜2˜a˜S ”mÑBùó   ‚)Ú_Section__comment_linesr   r?   r   Úitemsr	   r0   s    r   Ú__str__zSection.__str__^   sU   € ð × Ñ  §¡Ó-Ø�g‰gÑB°·	±	·±Ó0AÔBÓBñCà×"Ñ" 4§;¡;Ó/ñ0ð	
r'   r.   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚstrÚ__annotations__ÚdictÚtypingÚUnionr   r&   r)   r,   r/   r1   Úoverloadr$   r   ÚstaticmethodrF   rH   r3   r'   r   r   r      sP  … ñð
 ×
!Ñ
! # s (Ñ
+Ó+Ø˜˜S˜‘>Ó!ØƒKØƒKð, §¡¨S°)¨^Ñ <ó ,ð4F˜sð F só FðC˜sð C tó Cð<˜sð <¨ð <°ó <ð˜$ó ð ‡_�_ð�sð ˜s T™zò ó ðð ‡_�_ð�sð  Qð ¨1¨s©7ò ó ðñ�sð  Q¨¡Xð ¸¸T¹ÀC¹ó ð ð
 ð 
¨ò 
ó ð
ð
˜ô 
r'   r   c                   ób   — e Zd ZdZdej
                  fd„Zdej                  e	   fd„Z
defd„Zy)ÚFilezC
    Parse a given file object into a list of Section objects.
    Úfobjc                 óð   — g | _         d}|D ]A  }|j                  «       s||z  }Œ|sŒ| j                   j                  t        |«      «       d}ŒC |r%| j                   j                  t        |«      «       y y )Nr   )ÚsectionsÚisspaceÚappendr   )r   rV   r
   r   s       r   r   zFile.__init__l   so   € ØˆŒØˆØò 	ˆDØ—<‘<”>à˜4‘‘Úà—‘×$Ñ$¤W¨WÓ%5Ô6Ø‘ð	ñ Ø�M‰M× Ñ ¤¨Ó!1Õ2ð r'   r!   c                 ó,   — t        | j                  «      S r.   )ÚiterrX   r0   s    r   Ú__iter__zFile.__iter__|   s   € Ü�D—M‘MÓ"Ð"r'   c                 óF   — dj                  d„ | j                  D «       «      S )Nr   c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr.   )rM   )r=   Úss     r   r>   zFile.__str__.<locals>.<genexpr>€   s   è ø€ Ò7 Aœ˜QŸÑ7ùrE   )r?   rX   r0   s    r   rH   zFile.__str__   s   € Ø�y‰yÑ7¨¯©Ô7Ó7Ð7r'   N)rI   rJ   rK   rL   ÚioÚ
TextIOBaser   rP   ÚIteratorr   r]   rM   rH   r3   r'   r   rU   rU   g   s8   „ ñð3˜RŸ]™]ó 3ð #˜&Ÿ/™/¨'Ñ2ó #ð8˜ô 8r'   rU   Ú__main__zV# Header
# More header
K1: V1
# Inline
K2: V2
 # not a comment
# Footer
# More footer
)rL   r   ra   rP   r   ÚTypeVarr   r   rU   rI   Ústr`   Úprintr3   r'   r   ú<module>rh      sf   ðñ Bã Û 	Û ã à€F‡N�N�3Ó€÷R
ñ R
÷j8ñ 8ð8 ˆzÒð
€Bñ 	�‹€Aá	ˆ!…Hð r'   