ó
    Ð]js  ã                  óº   • S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSK	J
r
Jr  SSKJr  SSKJr  SS	KJr  SS
KJr  \(       a  SSKJr  \" \5      r " S S5      rg)z'Source file annotation for coverage.py.é    )ÚannotationsN)ÚTYPE_CHECKING)Úflat_rootname)Ú
ensure_dirÚisolate_module)ÚFileReporter)Úget_analysis_to_report)ÚAnalysis)ÚTMorfs)ÚCoveragec                  ó‚   • \ rS rSrSrS
S jr\R                  " S5      r\R                  " S5      r	SSS jjr
SS jrS	rg)ÚAnnotateReporteré   aÛ  Generate annotated source files showing line coverage.

This reporter creates annotated copies of the measured source files. Each
.py file is copied as a .py,cover file, with a left-hand margin annotating
each line::

    > def h(x):
    -     if 0:   #pragma: no cover
    -         pass
    >     if x == 1:
    !         a = 1
    >     else:
    >         a = 2

    > h(2)

Executed lines use ">", lines not executed use "!", lines excluded from
consideration use "-".

c                óT   • Xl         U R                   R                  U l        S U l        g ©N)ÚcoverageÚconfigÚ	directory)Úselfr   s     ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/coverage/annotate.pyÚ__init__ÚAnnotateReporter.__init__/   s   € Ø ŒØ—m‘m×*Ñ*ˆŒØ%)ˆ�ó    z\s*(#|$)z\s*else\s*:\s*(#|$)Nc                ó¤   • X l         U R                  R                  5         [        U R                  U5       H  u  p4U R	                  X45        M     g)z9Run the report.

See `coverage.report()` for arguments.

N)r   r   Úget_datar	   Úannotate_file)r   Úmorfsr   ÚfrÚanalysiss        r   ÚreportÚAnnotateReporter.report7   s?   € ð #ŒØ�‰×ÑÔ Ü2°4·=±=À%ÖH‰LˆBØ×Ñ˜rÖ,ò Ir   c                ó�  • [        UR                  5      n[        UR                  5      n[        UR                  5      nU R                  (       aw  [        U R                  5        [        R                  R                  U R                  [        UR                  5       5      5      nUR                  S5      (       d   eUSS S-   nOUR                  nUS-  n[        USSS9 nS	=p‰S
n
UR                  5       n[        UR!                  S
5      SS9 GH–  u  pÍU[#        U5      :  a&  X8   U:  a  US-  nU[#        U5      :  a
  X8   U:  a  M  U	[#        U5      :  a&  XI   U:  a  U	S-  n	U	[#        U5      :  a
  XI   U:  a  M  U[#        U5      :  a$  X8   U:X  a  U	[#        U5      :¬  =(       d    XI   U:„  n
U R$                  R'                  U5      (       a  UR)                  S5        O°U R*                  R'                  U5      (       aO  U	[#        U5      :¼  a  UR)                  S5        OoX8   XI   :X  a  UR)                  S5        OSUR)                  S5        OAXÅ;   a  UR)                  S5        O*U
(       a  UR)                  S5        OUR)                  S5        UR)                  U5        GM™     SSS5        g! , (       d  f       g= f)zMAnnotate a single file.

`fr` is the FileReporter for the file to annotate.

Ú_pyNéýÿÿÿz.pyz,coverÚwzutf-8)Úencodingr   Té   )Ústartz  z> z! z- )ÚsortedÚ
statementsÚmissingÚexcludedr   r   ÚosÚpathÚjoinr   Úrelative_filenameÚendswithÚfilenameÚopenÚsourceÚ	enumerateÚ
splitlinesÚlenÚblank_reÚmatchÚwriteÚelse_re)r   r   r   r*   r+   r,   Ú	dest_fileÚdestÚiÚjÚcoveredr4   ÚlinenoÚlines                 r   r   ÚAnnotateReporter.annotate_fileB   s;  € ô ˜H×/Ñ/Ó0ˆ
Ü˜×)Ñ)Ó*ˆÜ˜(×+Ñ+Ó,ˆà�>�>Ü�t—~‘~Ô&ÜŸ™Ÿ™ T§^¡^´]À2×CWÑCWÓCYÓ5ZÓ[ˆIØ×%Ñ% e×,Ñ,Ð,Ð,Ø! # 2˜¨Ñ.‰IàŸ™ˆIØ�XÑˆ	ä�)˜S¨7Ò3°tØˆIˆAØˆGØ—Y‘Y“[ˆFÜ )¨&×*;Ñ*;¸DÓ*AÈÕ K‘�Øœ#˜j›/Ó)¨j©m¸fÓ.DØ˜‘F�Að œ#˜j›/Ó)¨j©m¸fÕ.Dàœ#˜g›,Ó&¨7©:¸Ó+>Ø˜‘F�Að œ#˜g›,Ó&¨7©:¸Õ+>à”s˜:“Ó&¨:©=¸FÓ+BØ¤3 w£<Ñ/×F°7±:ÀÑ3F�GØ—=‘=×&Ñ& t×,Ñ,Ø—J‘J˜tÕ$Ø—\‘\×'Ñ'¨×-Ñ-àœC ›LÓ(ØŸ
™
 4Õ(Ø#™¨'©*Ó4ØŸ
™
 4Õ(àŸ
™
 4Õ(ØÓ'Ø—J‘J˜tÕ$ÞØ—J‘J˜tÕ$à—J‘J˜tÔ$à—
‘
˜4× ñ1 !L÷	 4×3Ö3ús   Ã$A(J7Å3J7ÆD+J7Ê7
K)r   r   r   )r   r   ÚreturnÚNoner   )r   r   r   z
str | NonerD   rE   )r   r   r   r
   rD   rE   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚreÚcompiler8   r;   r    r   Ú__static_attributes__© r   r   r   r      s5   † ñô**ð
 �zŠz˜+Ó&€HØ�jŠjÐ/Ó0€Gö	-÷/!r   r   )rJ   Ú
__future__r   r-   rK   Útypingr   Úcoverage.filesr   Úcoverage.miscr   r   Úcoverage.pluginr   Úcoverage.report_corer	   Úcoverage.resultsr
   Úcoverage.typesr   r   r   r   rN   r   r   Ú<module>rW      sD   ðñ .å "ã 	Û 	Ý  å (ß 4Ý (Ý 7Ý %Ý !æÝ!á�BÓ€÷X!ò X!r   