ó
    Ð]j­­  ã                  óà  • S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
JrJrJr  SSKJr  SSKJrJrJr  SSKJr  SSKJr  SS	KJr  SS
KJrJr  SSKJrJr  SSK J!r!  SSK"J#r#J$r$  \" \5      r " S S5      r%\" SSS9 " S S5      5       r& " S S\5      r'\(\#\)\*\\+   \\+   4      4   r, " S S5      r- " S S\-5      r. " S S\-5      r/ " S S\-5      r0S!S jr1 " S S 5      r2g)"zCode parsing for coverage.py.é    )ÚannotationsN)ÚCallableÚIterableÚSequence)Ú	dataclass)ÚOptionalÚProtocolÚcast)Úenv)Ú
ByteParser)Úshort_stack)ÚNoSourceÚ	NotPython)Úisolate_moduleÚ	nice_pair)Úgenerate_tokens)ÚTArcÚTLineNoc                  ó
  • \ rS rSrSr   S       SS jjrSS jrSS jr\R                  " SS9SS	 j5       r
SS
 jrSS jrSS jrSS jrSS jrSS jrSS jr\R                  SS j5       rS S jrS!S jrS!S jrSrg)"ÚPythonParseré   z�Parse code to find executable lines, excluded lines, etc.

This information is all based on static analysis: no code execution is
involved.

Nc                óð  • U(       d  U(       d   S5       eU=(       d    SU l         Ub  Xl        OSSKJn   U" U R                   5      U l        X0l        SU l        [        5       U l	        [        5       U l
        [        5       U l        [        5       U l        [        5       U l        SU l        0 U l        SU l        SU l        0 U l        g! [         a!  n[        SU R                    SU 35      UeSnAff = f)	z¦
Source can be provided as `text`, the text itself, or `filename`, from
which the text will be read.  Excluded lines are those that match
`exclude`, a regex string.

z*PythonParser needs either text or filenamez<code>Nr   )Úget_python_sourcezNo source for code: 'z': F)ÚfilenameÚtextÚcoverage.pythonr   ÚOSErrorr   ÚexcludeÚ	_ast_rootÚsetÚ
statementsÚexcludedÚraw_statementsÚraw_excludedÚraw_docstringsÚshow_tokensÚmultiline_mapÚ	_all_arcsÚ_missing_arc_fragmentsÚ_with_jump_fixers)Úselfr   r   r   r   Úerrs         ÚL/home/mande/repo/quber/.venv/lib/python3.13/site-packages/coverage/parser.pyÚ__init__ÚPythonParser.__init__&   sñ   € ö –xÐMÐ!MÓMÐØ ×, HˆŒØÑØ!�Iå9ðYÙ-¨d¯m©mÓ<�”	ð Œð *.ˆŒô
 ),«ˆŒô '*£eˆŒô -0«EˆÔô +.«%ˆÔô -0«EˆÔð !ˆÔð 68ˆÔð ,0ˆŒØ<@ˆÔ#Ø@BˆÕøôQ ó YÜÐ!6°t·}±}°oÀSÈÈÐNÓOÐUXÐXûðYús   ·C
 Ã

C5ÃC0Ã0C5c           	     óŒ  ^ • [        5       nSnSn[        R                  " UT R                  [        R                  S9 H‚  nUR                  5       u  pgUT R                  R                  SX65      -   nUT R                  R                  SX75      -   n	UR                  U 4S j[        US-   U	S-   5       5       5        UnUnM„     U$ )zÂFind the lines matching a regex.

Returns a set of line numbers, the lines that contain a match for
`regex`. The entire line needn't match, just a part of it.
Handles multiline regex patterns.

r   )ÚflagsÚ
c              3  óZ   >#   • U  H   nTR                   R                  X5      v •  M"     g 7f©N©r'   Úget)Ú.0Úir+   s     €r-   Ú	<genexpr>Ú.PythonParser.lines_matching.<locals>.<genexpr>u   s)   øé € ð Ú6Y°�×"Ñ"×&Ñ& q×,Ð,Ò6Yùs   ƒ(+é   é   )	r    ÚreÚfinditerr   Ú	MULTILINEÚspanÚcountÚupdateÚrange)
r+   ÚregexÚmatchesÚ
last_startÚlast_start_lineÚmatchÚstartÚendÚ
start_lineÚend_lines
   `         r-   Úlines_matchingÚPythonParser.lines_matchinge   s±   ø€ ô !$£ˆàˆ
ØˆÜ—[’[ ¨¯	©	¼¿¹ÔFˆEØŸ™›‰JˆEØ(¨4¯9©9¯?©?¸4ÀÓ+SÑSˆJØ&¨¯©¯©¸¸zÓ)OÑOˆHØ�N‰Nô Ü6;¸JÈ¹NÈHÐWXÉLÔ6Yóô ð ˆJØ(ŠOñ Gð ˆó    c           
     ó
  • U R                   (       a:  U R                  U R                   5      U l        [        U R                  5      U l        SnSnSnSnSnSnU R
                  c   e[        U R
                  5      nU GHØ  u  p‰u  p«u  pËnU R                  (       aD  [        [        R                  R                  Xˆ5      <S S[        X¬45      <S SU	<S SU< 35        U[        R                  :X  a  US	-  nOìU[        R                  :X  a  US	-  nOÒU[        R                   :X  ay  U	S
:X  a[  US:X  aU  U R                  R#                  [%        XLS	-   5      5      nU(       d&  U(       a  U R                  R'                  U5        UnSnO]U	S;   a  US	-  nOQU	S;   a  US	-  nOEU[        R(                  :X  a1  U(       a(  XÄ:w  a#  [%        XLS	-   5       H  nX@R*                  U'   M     SnU	R-                  5       (       d  GM€  U[        R.                  :w  d  GM—  SnU(       a  GM£  U
nU(       a  X::  a  SnU(       d  GM½  U R                  R'                  U5        GMÛ     U(       dG  [1        U R
                  U R2                  S9nU R4                  R7                  UR9                  5       5        U R;                  U R                  5      U l        U R<                  c   e[>        R@                  " U R<                  5       GH  n[C        U[>        RD                  [>        RF                  [>        RH                  [>        RJ                  45      (       aÛ  URL                  (       aÊ  URL                  S   n[C        U[>        RN                  5      (       aœ  [C        URP                  [>        RR                  5      (       as  [C        URP                  RP                  [T        5      (       aJ  U RV                  R7                  [%        URX                  [[        [\        UR^                  5      S	-   5      5        [C        U[>        RD                  [>        RF                  [>        RH                  45      (       d  GMm  [a        S URb                   5       URX                  S9nU R                  R#                  [%        UURX                  S	-   5      5      (       d  GMÌ  U R                  R7                  [%        U[[        [\        UR^                  5      S	-   5      5        GM     g)zgParse the source to find the interesting facts about its lines.

A handful of attributes are updated.

r   FTNz>10Ú z>5Ú20r;   Ú:z([{z)]})r   r   c              3  ó8   #   • U  H  oR                   v •  M     g 7fr4   ©Úlineno)r7   Úds     r-   r9   Ú*PythonParser._raw_parse.<locals>.<genexpr>â   s   é € Ð!HÒ4G¨q§(¦(Ò4Gùs   ‚)Údefault)2r   rM   r$   r    r"   r   r   r&   ÚprintÚtokenizeÚtok_namer6   r   ÚtokenÚINDENTÚDEDENTÚOPÚintersectionrC   ÚaddÚNEWLINEr'   ÚstripÚCOMMENTr   r   r#   rB   Úfind_statementsÚfirst_linesr   ÚastÚwalkÚ
isinstanceÚClassDefÚFunctionDefÚAsyncFunctionDefÚModuleÚbodyÚExprÚvalueÚConstantÚstrr%   rV   r
   ÚintÚ
end_linenoÚminÚdecorator_list)r+   ÚindentÚexclude_indentÚ	excludingÚ
first_lineÚemptyÚnestingÚtokgenÚtoktypeÚttextÚslinenoÚ_ÚelinenoÚltextÚshould_excludeÚlÚbyte_parserÚnodeÚfirsts                      r-   Ú
_raw_parseÚPythonParser._raw_parse|   s°  € ð �<�<Ø $× 3Ñ 3°D·L±LÓ AˆDÔÜ × 1Ñ 1Ó2ˆDŒMð ˆàˆàˆ	àˆ
àˆàˆà�y‰yÑ$Ð$Ð$Ü  §¡Ó+ˆÜAGÑ=ˆG™L˜W©,¨7¸Ø××Üô !×)Ñ)×-Ñ-¨g×?Ü! 7Ð"4×5ÜÚðôð œ%Ÿ,™,Ó&Ø˜!‘‘ØœEŸL™LÓ(Ø˜!‘‘ØœEŸH™HÓ$Ø˜C“< G¨q£LØ%)§]¡]×%?Ñ%?ÄÀjÐ\]ÑR]Ó@^Ó%_�NÞ$®ð Ÿ™×)Ñ)¨'Ô2Ø)/˜Ø$(˜	øØ˜e“^Ø˜q‘L‘GØ˜e“^Ø˜q‘L�GøØœEŸM™MÓ)Þ 'Ó"7ô # :¸©{Ö;˜Ø0:×*Ñ*¨1Ó-ñ <à�
à�{‰{�}Œ} ¬H×,<Ñ,<Ö!<à�ß!‘zà!(�Jæ  VÓ%=Ø$)˜	ß ‘yØŸ™×)Ñ)¨'×2ña BHöf Ü$¨$¯)©)¸d¿m¹mÑLˆKØ×Ñ×&Ñ& {×'BÑ'BÓ'DÔEà×(Ñ(¨¯©Ó7ˆŒð �~‰~Ñ)Ð)Ð)Ü—H’H˜TŸ^™^×,ˆDä˜$¤§¡¬s¯©Ä×@TÑ@TÔVY×V`ÑV`Ð a×bÑbØ—9—9Ø ŸI™I a™L�Eä" 5¬#¯(©(×3Ñ3Ü& u§{¡{´C·L±L×AÑAÜ& u§{¡{×'8Ñ'8¼#×>Ñ>à×+Ñ+×2Ñ2Ü! %§,¡,´´S¸%×:JÑ:JÓ0KÈaÑ0OÓPôô
 ˜$¤§¡¬s¯©Ä×@TÑ@TÐ U×VÔVÜ Ñ!H°D×4GÒ4GÓ!HÐRV×R]ÑR]Ñ^�
Ø—=‘=×-Ñ-¬e°JÀÇÁÈaÁÓ.P×QÔQØ—M‘M×(Ñ(¬¨z¼4ÄÀTÇ_Á_Ó;UÐXYÑ;YÓ)Z×[ò% -rO   iè  )Úmaxsizec                óŠ   • US:  a!  U R                   R                  U* U* 5      * nU$ U R                   R                  X5      nU$ )zAReturn the first line number of the statement including `lineno`.r   r5   )r+   rV   s     r-   r{   ÚPythonParser.first_lineæ   sN   € ð �A‹:Ø×(Ñ(×,Ñ,¨f¨W°v°gÓ>Ð>ˆFð ˆð ×'Ñ'×+Ñ+¨FÓ;ˆFØˆrO   c                óN   • U Vs1 s H  o R                  U5      iM     sn$ s  snf )zrMap the line numbers in `linenos` to the correct first line of the
statement.

Returns a set of the first lines.

)r{   )r+   Úlinenosr†   s      r-   rg   ÚPythonParser.first_linesï   s#   € ñ -4Ó4ªG q—‘ Ö"©GÑ4Ð4ùÒ4s   …"c                ó$   • U R                  U5      $ )z)Implement `FileReporter.translate_lines`.)rg   )r+   Úliness     r-   Útranslate_linesÚPythonParser.translate_linesø   s   € à×Ñ Ó&Ð&rO   c                óš   • U R                  U5       VVs1 s H'  u  p#U R                  U5      U R                  U5      4iM)     snn$ s  snnf )z(Implement `FileReporter.translate_arcs`.)Úfix_with_jumpsr{   )r+   ÚarcsÚaÚbs       r-   Útranslate_arcsÚPythonParser.translate_arcsü   sA   € àGK×GZÑGZÐ[_ÔG`ÔaÒG`¹V¸a�—‘ Ó# T§_¡_°QÓ%7Ó8ÑG`ÒaÐaùÓas   •.Ac                ó   •  [         R                  " U R                  5      U l        U R	                  5         U R                  U R                  -  nU R                   U-
  nU R#                  U5      U-
  U l        g! [
        R                  [        [        4 ae  n[        US5      (       a  UR                  nOUR                  S   S   n[        SU R                   S3UR                  S   < SU 3-   5      UeSnAff = f)z©Parse source text to find executable lines, excluded lines, etc.

Sets the .excluded and .statements attributes, normalized to the first
line of multi-line statements.

rV   r;   r   zCouldn't parse 'z' as Python source: z	 at line N)rh   Úparser   r   rŠ   r[   Ú
TokenErrorÚIndentationErrorÚSyntaxErrorÚhasattrrV   Úargsr   r   r"   r%   r#   rg   r!   )r+   r,   rV   ÚignoreÚstartss        r-   Úparse_sourceÚPythonParser.parse_source   sç   € ð	Ü ŸYšY t§y¡yÓ1ˆDŒNØ�O‰OÔð —‘ ×!4Ñ!4Ñ4ˆØ×$Ñ$ vÑ-ˆØ×*Ñ*¨6Ó2°VÑ;ˆ�øô ×#Ñ#Ô%5´{ÐCó 	Ü�s˜H×%Ñ%ØŸ™‘àŸ™ !™ Q™�ÜØ" 4§=¡= /Ð1EÐFØ—X‘X˜a‘[‘O 9¨V¨HÐ5ñ6óð ðûð	ús   ‚5A9 Á9C=ÂA C8Ã8C=c                ór   • U R                   c  U R                  5         U R                   c   eU R                   $ )z«Get information about the arcs available in the code.

Returns a set of line number pairs.  Line numbers have been normalized
to the first line of multi-line statements.

)r(   Ú_analyze_ast©r+   s    r-   r˜   ÚPythonParser.arcs  s4   € ð �>‰>Ñ!Ø×ÑÔØ�~‰~Ñ)Ð)Ð)Ø�~‰~ÐrO   c                ó  • U R                   c   e[        U R                  U R                   U R                  U R                  5      nUR                  5         UR                  nUR                  5       U l        U R                  (       a  U R                  U5      n[        5       U l        U HJ  u  p4U R                  U5      nU R                  U5      nXV:w  d  M.  U R                  R                  XV45        ML     UR                  U l        g)z[Run the AstArcAnalyzer and save its results.

`_all_arcs` is the set of arcs in the code.

N)r   ÚAstArcAnalyzerr   r#   r'   Úanalyzer˜   Úwith_jump_fixersr*   r—   r    r(   r{   rb   Úmissing_arc_fragmentsr)   )r+   Úaaar˜   Úl1Úl2Úfl1Úfl2s          r-   r©   ÚPythonParser._analyze_ast$  sÏ   € ð �~‰~Ñ)Ð)Ð)Ü˜TŸ]™]¨D¯N©N¸D×<OÑ<OÐQU×QcÑQcÓdˆØ�‰ŒØ�x‰xˆØ!$×!5Ñ!5Ó!7ˆÔØ×!×!Ø×&Ñ& tÓ,ˆDä›ˆŒÛ‰FˆBØ—/‘/ "Ó%ˆCØ—/‘/ "Ó%ˆCØ�zØ—‘×"Ñ" C :Ö.ñ	 ð '*×&?Ñ&?ˆÕ#rO   c                óÄ  • [        5       n[        5       nU H´  nX@R                  ;   d  M  US   nUR                  U5        U R                  U   u  pgX`R                  ;   aD  UR                  U5        U R                  U   u  pgUR                  U5        X`R                  ;   a  MD  UR                  XWS   45        UR                  U5        M¶     [        U5      U-  U-
  nU$ )a  Adjust arcs to fix jumps leaving `with` statements.

Consider this code:

    with open("/tmp/test", "w") as f1:
        a = 2
        b = 3
    print(4)

In 3.10+, we get traces for lines 1, 2, 3, 1, 4.  But we want to present
it to the user as if it had been 1, 2, 3, 4.  The arc 3->1 should be
replaced with 3->4, and 1->4 should be removed.

For this code, the fixers dict is {(3, 1): ((1, 4), (3, 4))}.  The key
is the actual measured arc from the end of the with block back to the
start of the with-statement.  The values are start_next (the with
statement to the next statement after the with), and end_next (the end
of the with-statement to the next statement after the with).

With nested with-statements, we have to trace through a few levels to
correct a longer chain of arcs.

r   r;   )r    r*   rb   )r+   r˜   Ú	to_removeÚto_addÚarcÚend0Ú
start_nextÚend_nexts           r-   r—   ÚPythonParser.fix_with_jumps;  sÐ   € ô0 “Eˆ	Ü“ˆÛˆCØ×,Ñ,Õ,Ø˜1‘v�Ø—‘˜cÔ"Ø'+×'=Ñ'=¸cÑ'BÑ$�
Ø ×$:Ñ$:Ó:Ø—M‘M *Ô-Ø+/×+AÑ+AÀ*Ñ+MÑ(�JØ—M‘M (Ô+ð !×$:Ñ$:Õ:ð —
‘
˜D¨1¡+Ð.Ô/Ø—‘˜jÖ)ñ ô �D“	˜FÑ" iÑ/ˆØˆrO   c                ó  • [         R                  " [        5      nU R                  5        HQ  u  p#US:”  d   SU< SU R                   35       eX R
                  ;   a  M4  X0R
                  ;   a  ME  X==   S-  ss'   MS     U$ )zIGet a count of exits from that each line.

Excluded lines are excluded.

r   zl1=z  should be greater than zero in r;   )ÚcollectionsÚdefaultdictrt   r˜   r   r"   )r+   Úexit_countsr²   r³   s       r-   rÂ   ÚPythonParser.exit_countsc  sw   € ô +6×*AÒ*AÄ#Ó*FˆØ—i‘i–k‰FˆBØ˜“6ÐR˜c˜b™UÐ"BÀ4Ç=Á=À/ÐRÓR�6Ø—]‘]Ó"áØ—]‘]Ó"áØ‹O˜qÑ �Oñ "ð ÐrO   c                ó@   • Uc  US:  a  SnOSnUR                  US9nU$ )z=Apply some defaulting and formatting to an arc's description.r   zjump to the function exitzjump to line {lineno}rU   )Úformat)r+   Ú
action_msgrJ   s      r-   Ú_finish_action_msgÚPythonParser._finish_action_msgw  s2   € àÑØ�Q‹wØ8‘
à4�
Ø×&Ñ&¨cÐ&Ð2ˆ
ØÐrO   c                óV  • U R                   c  U R                  5         U R                   c   eU R                   R                  X4S/5      n/ nU HG  u  pVU R                  Xb5      nSU SU 3nUb  USUR	                  US9 3-  nUR                  U5        MI     SR                  U5      $ )z5Provide an English sentence describing a missing arc.©NNzline z didn't z	 because rU   z or )r)   r©   r6   rÇ   rÅ   ÚappendÚjoin)r+   rI   rJ   Úfragment_pairsÚmsgsÚmissing_cause_msgrÆ   Úmsgs           r-   Úmissing_arc_descriptionÚ$PythonParser.missing_arc_description�  sÁ   € à×&Ñ&Ñ.Ø×ÑÔØ×.Ñ.Ñ:Ð:Ð:à×4Ñ4×8Ñ8¸%¸ÈÀ~ÓVˆàˆÛ-;Ñ)ÐØ×0Ñ0°ÓAˆJØ˜%˜ ¨¨Ð5ˆCØ Ñ,Ø˜Ð#4×#;Ñ#;À5Ð#;Ð#IÐ"JÐKÑK�à�K‰K˜Öñ .<ð �{‰{˜4Ó Ð rO   c                óÊ   • U R                   c  U R                  5         U R                   c   eU R                   R                  X4S/5      nU R                  US   S   U5      nU$ )z2Provide an English description of an arc's effect.rÊ   r   r;   )r)   r©   r6   rÇ   )r+   rI   rJ   rÍ   rÆ   s        r-   Úarc_descriptionÚPythonParser.arc_description”  sj   € à×&Ñ&Ñ.Ø×ÑÔØ×.Ñ.Ñ:Ð:Ð:à×4Ñ4×8Ñ8¸%¸ÈÀ~ÓVˆØ×,Ñ,¨^¸AÑ->¸qÑ-AÀ3ÓGˆ
ØÐrO   )r(   r   r)   r*   r   r"   r   r'   r%   r$   r#   r&   r!   r   )NNN)r   ú
str | Noner   rÖ   r   rÖ   ÚreturnÚNone)rD   rs   r×   úset[TLineNo]©r×   rØ   )rV   r   r×   r   )r�   úIterable[TLineNo]r×   rÙ   )r“   rÛ   r×   rÙ   )r˜   zIterable[TArc]r×   ú	set[TArc])r×   rÜ   )r×   zdict[TLineNo, int])rÆ   rÖ   rJ   r   r×   rs   )rI   r   rJ   r   r×   rs   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r.   rM   rŠ   Ú	functoolsÚ	lru_cacher{   rg   r”   r›   r¦   r˜   r©   r—   rÂ   rÇ   rÑ   rÔ   Ú__static_attributes__© rO   r-   r   r      s¾   † ñð  Ø#Ø"ð	=Càð=Cð ð=Cð ð	=Cð
 
õ=Cô~ô.h\ðT ×Ò Ñ&óó 'ðô5ô'ôbô<ô0
ô@ô.&ðP ×Ñóó ðô&ô!÷&rO   r   T)ÚfrozenÚorderc                  ó2   • \ rS rSr% SrS\S'   SrS\S'   Srg	)
ÚArcStarti¤  a÷  The information needed to start an arc.

`lineno` is the line number the arc starts from.

`cause` is an English text fragment used as the `missing_cause_msg` for
AstArcAnalyzer.missing_arc_fragments.  It will be used to describe why an
arc wasn't executed, so should fit well into a sentence of the form,
"Line 17 didn't run because {cause}."  The fragment can include "{lineno}"
to have `lineno` interpolated into it.

As an example, this code::

    if something(x):        # line 1
        func(x)             # line 2
    more_stuff()            # line 3

would have two ArcStarts:

- ArcStart(1, "the condition on line 1 was always true")
- ArcStart(1, "the condition on line 1 was never true")

The first would be used to create an arc from 1 to 3, creating a message like
"line 1 didn't jump to line 3 because the condition on line 1 was always true."

The second would be used for the arc from 1 to 2, creating a message like
"line 1 didn't jump to line 2 because the condition on line 1 was never true."

r   rV   Ú rs   Úcauserå   N)rÝ   rÞ   rß   rà   rá   Ú__annotations__rë   rä   rå   rO   r-   ré   ré   ¤  s   ‡ ñð: ƒOØ€Eˆ3†OrO   ré   c                  ó<   • \ rS rSrSr  S         SS jjrSrg)Ú	TAddArcFniÇ  z&The type for AstArcAnalyzer.add_arc().Nc                ó   • g)a*  
Record an arc from `start` to `end`.

`missing_cause_msg` is a description of the reason the arc wasn't
taken if it wasn't taken.  For example, "the condition on line 10 was
never true."

`action_msg` is a description of what the arc does, like "jump to line
10" or "exit from function 'fooey'."

Nrå   ©r+   rI   rJ   rÏ   rÆ   s        r-   Ú__call__ÚTAddArcFn.__call__Ê  s   � rO   rå   rÊ   ©
rI   r   rJ   r   rÏ   rÖ   rÆ   rÖ   r×   rØ   )rÝ   rÞ   rß   rà   rá   rñ   rä   rå   rO   r-   rî   rî   Ç  sG   † Ù0ð )-Ø!%ðàðð ðð &ð	ð
 ðð 
÷ð rO   rî   c                  ó@   • \ rS rSrSrS	S jrS	S jrS	S jrS	S jrSr	g)
ÚBlockiá  a#  
Blocks need to handle various exiting statements in their own ways.

All of these methods take a list of exits, and a callable `add_arc`
function that they can use to add arcs if needed.  They return True if the
exits are handled, or False if the search should continue up the block
stack.
c                ó   • g)zProcess break exits.Frå   ©r+   ÚexitsÚadd_arcs      r-   Úprocess_break_exitsÚBlock.process_break_exitsì  ó   € àrO   c                ó   • g)zProcess continue exits.Frå   r÷   s      r-   Úprocess_continue_exitsÚBlock.process_continue_exitsð  rü   rO   c                ó   • g)zProcess raise exits.Frå   r÷   s      r-   Úprocess_raise_exitsÚBlock.process_raise_exitsô  rü   rO   c                ó   • g)zProcess return exits.Frå   r÷   s      r-   Úprocess_return_exitsÚBlock.process_return_exitsø  rü   rO   rå   N©rø   úset[ArcStart]rù   rî   r×   Úbool)
rÝ   rÞ   rß   rà   rá   rú   rþ   r  r  rä   rå   rO   r-   rõ   rõ   á  s   † ñôôô÷rO   rõ   c                  ó6   • \ rS rSrSrSS jrS	S jrS	S jrSrg)
Ú	LoopBlockiý  z@A block on the block stack representing a `for` or `while` loop.c                ó.   • Xl         [        5       U l        g r4   )rI   r    Úbreak_exits)r+   rI   s     r-   r.   ÚLoopBlock.__init__   s   € àŒ
ä*-«%ˆÕrO   c                ó:   • U R                   R                  U5        g©NT)r  rB   r÷   s      r-   rú   ÚLoopBlock.process_break_exits  s   € Ø×Ñ×Ñ Ô&ØrO   c                óf   • U H+  nU" UR                   U R                  UR                  5        M-     gr  )rV   rI   rë   ©r+   rø   rù   Úxits       r-   rþ   Ú LoopBlock.process_continue_exits
  s'   € ÛˆCÙ�C—J‘J §
¡
¨C¯I©IÖ6ñ àrO   )r  rI   N)rI   r   r×   rØ   r  )	rÝ   rÞ   rß   rà   rá   r.   rú   rþ   rä   rå   rO   r-   r
  r
  ý  s   † ÙJô0ô÷rO   r
  c                  ó6   • \ rS rSrSrSS jrS	S jrS	S jrSrg)
ÚFunctionBlocki  z>A block on the block stack representing a function definition.c                ó   • Xl         X l        g r4   ©rI   Úname)r+   rI   r  s      r-   r.   ÚFunctionBlock.__init__  s   € àŒ
à�	rO   c                ó†   • U H;  nU" UR                   U R                  * UR                  SU R                  < 35        M=     g)Nzexcept from function T©rV   rI   rë   r  r  s       r-   r  Ú!FunctionBlock.process_raise_exits  ó>   € ÛˆCÙØ—
‘
Ø—‘�Ø—	‘	Ø'¨¯	©	¡}Ð5ö	ñ ð rO   c                ó†   • U H;  nU" UR                   U R                  * UR                  SU R                  < 35        M=     g)Nzreturn from function Tr  r  s       r-   r  Ú"FunctionBlock.process_return_exits#  r  rO   )r  rI   N)rI   r   r  rs   r×   rØ   r  )	rÝ   rÞ   rß   rà   rá   r.   r  r  rä   rå   rO   r-   r  r    s   † ÙHôô÷rO   r  c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	ÚTryBlocki.  z6A block on the block stack representing a `try` block.c                ó   • Xl         X l        g r4   )Úhandler_startÚfinal_start)r+   r$  r%  s      r-   r.   ÚTryBlock.__init__1  s   € à*Ôà&ÕrO   c                ó€   • U R                   b1  U H+  nU" UR                  U R                   UR                  5        M-     gr  )r$  rV   rë   r  s       r-   r  ÚTryBlock.process_raise_exits7  s5   € Ø×ÑÑ)Û�Ù˜Ÿ
™
 D×$6Ñ$6¸¿	¹	ÖBñ àrO   )r%  r$  N)r$  úTLineNo | Noner%  r)  r×   rØ   r  )rÝ   rÞ   rß   rà   rá   r.   r  rä   rå   rO   r-   r"  r"  .  s   † Ù@ô'÷rO   r"  c                óô  • U =[         R                  S` =b  u     S[        U R                  5      4$   =[         R                  S` =b,  u     U R
                  S;   a  S[        U R
                  5      4$  g  =[         R                  S` =bM  u     [        U R                  [         R                  5      (       a  [        U R                  5      u  pX(       + 4$  g  [         R                  S` =bˆ  u   U R                   Vs/ s H  n[        U5      PM     nn[        S U 5       5      nU(       aF  [        U R                  [         R                   5      (       a  ["        O[        nSU" S U 5       5      4$  g  gs  snf )z¾Is this a compile-time constant test expression?

We don't try to mimic all of CPython's optimizations.  We just have to
handle the kinds of constant expressions people might actually use.

rå   T)ÚTrueÚFalserØ   Ú	__debug__c              3  ó*   #   • U  H	  u  pUv •  M     g 7fr4   rå   )r7   Úis_constr‚   s      r-   r9   Ú(is_constant_test_expr.<locals>.<genexpr>T  s   é € Ð?º$©;¨8�hº$ùó   ‚c              3  ó*   #   • U  H	  u  pUv •  M     g 7fr4   rå   )r7   r‚   Úvs      r-   r9   r0  W  s   é € Ð3ªd¡d a¥ªdùr1  )FF)rh   rr   r  rq   ÚNameÚidÚevalÚUnaryOprj   ÚopÚNotÚis_constant_test_exprÚoperandÚBoolOpÚvaluesÚallÚOrÚany)rˆ   Úis_constantÚvalr3  Úretsr8  s         r-   r:  r:  A  s:  € ð ØŒS�\‰\�^Øœ˜dŸj™jÓ)Ð)Ð)ð àŒS�X‰X�ZØ�w‰wÐ@Ó@ØœT $§'¡'›]Ð*Ð*ð Að ð ð ŒS�[‰[�]Ü˜$Ÿ'™'¤3§7¡7×+Ñ+Ü#8¸¿¹Ó#FÑ �Ø"¤GÐ+Ð+ð ,ð ð ô �Z‰ZŽ\Ø6:·k²kÓB²k°Ô)¨!Ö,±kˆDÐBÜÑ?¹$Ó?Ó?ˆKÞÜ& t§w¡w´·±×7Ñ7•S¼S�Ø™RÑ3©dÓ3Ó3Ð3Ð3ð ð ð ð ùò Cs   Ã;E5c                  óÂ  • \ rS rSrSr          S%S jrS&S jrS'S jrS(S jrS)S jr	\	r
S*S jr  S+         S,S
 jjrS-S jrS.S jrS/S jrS0S jr\rS1S jr\r\rS2S jrS3S jr1 SkrS4S jr  S+       S5S jjrS6S jrS6S jrS6S jrS6S jrS7S jrS8S jr\r S9S jr!S:S jr"\"r#\r$\r%S;S jr&S<S jr'S=S jr(S>S  jr)S?S! jr*\*r+S@S" jr,SAS# jr-\-r.S$r/g	)Br­   i[  aÇ  Analyze source text with an AST to find executable code paths.

The .analyze() method does the work, and populates these attributes:

`arcs`: a set of (from, to) pairs of the the arcs possible in the code.

`missing_arc_fragments`: a dict mapping (from, to) arcs to lists of
message fragments explaining why the arc is missing from execution::

    { (start, end): [(missing_cause_msg, action_msg), ...], }

For an arc starting from line 17, they should be usable to form complete
sentences like: "Line 17 didn't {action_msg} because {missing_cause_msg}".

NOTE: Starting in July 2024, I've been whittling this down to only report
arc that are part of true branches.  It's not clear how far this work will
go.

c                óÎ  • Xl         X l        U Vs1 s H  oTR                  XU5      iM     snU l        X@l        [        [        [        R                  " SS5      5      5      nU(       aY  [        SU R                   35        [        SU R                   35        [        [        R                  " U R                  SSS95        [        5       U l        [        R                  " [         5      U l        / U l        [        5       U l        [        5       U l        [        5       U l        [        5       U l        [        [        [        R                  " SS5      5      5      U l        g s  snf )	NÚCOVERAGE_AST_DUMPÚ0zStatements: zMultiline map: Té   )Úinclude_attributesrx   ÚCOVERAGE_TRACK_ARCS)r   Ú	root_noder6   r!   Ú	multiliner  rt   ÚosÚgetenvrZ   rh   Údumpr    r˜   rÀ   rÁ   Úlistr°   Úblock_stackÚcurrent_with_startsÚall_with_startsÚwith_entriesÚ
with_exitsÚdebug)r+   r   rK  r!   rL  r†   Údump_asts          r-   r.   ÚAstArcAnalyzer.__init__p  s  € ð !ŒØ"ŒÙ8BÓCº
°1Ÿ=™=¨Ö.¹
ÑCˆŒØ"Œô œœBŸIšIÐ&9¸3Ó?Ó@ÓAˆæä�L §¡Ð 1Ð2Ô3Ü�O D§N¡NÐ#3Ð4Ô5Ü”#—(’(˜4Ÿ>™>¸dÈ1ÑMÔNä"›uˆŒ	Ü4?×4KÒ4KÌDÓ4QˆÔ"Ø(*ˆÔô 25³ˆÔ Ü-0«UˆÔÜ'*£uˆÔÜ%(£UˆŒô œ#œbŸišiÐ(=¸sÓCÓDÓEˆ�
ùò7 Ds   ‘E"c                ó¸   • [         R                  " U R                  5       H6  nUR                  R                  n[        U SU 3S5      nUc  M.  U" U5        M8     g)zFExamine the AST tree from `self.root_node` to determine possible arcs.Ú_code_object__N)rh   ri   rK  Ú	__class__rÝ   Úgetattr)r+   rˆ   Ú	node_nameÚcode_object_handlers       r-   r®   ÚAstArcAnalyzer.analyze–  sL   € ä—H’H˜TŸ^™^Ö,ˆDØŸ™×/Ñ/ˆIÜ")¨$°.ÀÀÐ0LÈdÓ"SÐØ"Ó.Ù# DÖ)ò	 -rO   c                óô  • 0 nU R                    Vs1 s H+  nUS   U R                  ;   d  M  X R                  ;  d  M)  UiM-     nnU R                   H”  nU Vs1 s H  o"S   U:X  d  M  US   iM     nnU(       d  M+  [        U5      S:X  d   SU SU< 35       eUR	                  5       nU R
                   Vs1 s H  o"S   U:X  d  M  US   iM     nnU H  nXF4X†44XU4'   M     M–     U$ s  snf s  snf s  snf )a#  Get a dict with data for fixing jumps out of with statements.

Returns a dict.  The keys are arcs leaving a with-statement by jumping
back to its start.  The values are pairs: first, the arc from the start
to the next statement, then the arc that exits the with without going
to the start.

r   r;   zExpected one arc, got z with start = )r˜   rS  rT  ÚlenÚpoprU  )	r+   Úfixersrº   Ú
with_nextsrI   ÚnextsÚnxtÚendsrJ   s	            r-   r¯   ÚAstArcAnalyzer.with_jump_fixersž  s  € ð ˆð —y’yó
â �Ø�1‰v˜×-Ñ-Ñ-ó à25×=NÑ=NÑ2N÷ Ù ð 	ð 
ð
 ×)Ô)ˆEÙ'1ÓE¢z ¸±V¸u±_“V�S˜”V¡zˆEÐEÞÙÜ�u“: “?ÐTÐ&<¸U¸GÀ?È%ÉÐ$TÓT�?Ø—)‘)“+ˆCØ&*§o¢oÓI¢o˜s¸Q¹À5¹“F�C˜”F¡oˆDÐIÛ�Ø).¨°s°jÐ'A�˜U�|Ó$ó ñ *ð ˆùò
ùò Fùò
 Js'   ‘C+¬C+½C+ÁC0Á(	C0Â7C5Ã	C5c                ó  • U R                  U5      nUR                  (       aN  U R                  UR                  5      nU H,  nU R                  UR                  U* UR
                  S5        M.     g U R                  X"* 5        g )Nzexit the module)Úline_for_nodero   Úprocess_bodyrù   rV   rë   ©r+   rˆ   rI   rø   r  s        r-   Ú_code_object__ModuleÚ#AstArcAnalyzer._code_object__Module½  sd   € Ø×"Ñ" 4Ó(ˆØ�9�9Ø×%Ñ% d§i¡iÓ0ˆEÛ�Ø—‘˜SŸZ™Z¨%¨°·±Ð<MÖNò ð �L‰L˜ Õ'rO   c                ó
  • U R                  U5      nU R                  R                  [        X!R                  S95        U R                  UR                  5      nU R                  U5        U R                  R                  5         g )Nr  )	rj  rQ  rË   r  r  rk  ro   r  rb  )r+   rˆ   rI   rø   s       r-   Ú_code_object__FunctionDefÚ(AstArcAnalyzer._code_object__FunctionDefÇ  sc   € Ø×"Ñ" 4Ó(ˆØ×Ñ×Ñ¤°EÇ	Á	Ñ JÔKØ×!Ñ! $§)¡)Ó,ˆØ×!Ñ! %Ô(Ø×Ñ×ÑÕrO   c                óÜ   • U R                  U5      nU R                  UR                  5      nU H:  nU R                  UR                  U* UR
                  SUR                  < 35        M<     g )Nzexit class )rj  rk  ro   rù   rV   rë   r  rl  s        r-   Ú_code_object__ClassDefÚ%AstArcAnalyzer._code_object__ClassDefÐ  sW   € Ø×"Ñ" 4Ó(ˆØ×!Ñ! $§)¡)Ó,ˆÛˆCØ�L‰L˜Ÿ™ e V¨S¯Y©Y¸+ÀdÇiÁiÁ]Ð8SÖTò rO   Nc           
     óX  • U R                   (       a+  [        SU SU SU< SU< 35        [        [        5       SS9  U R                  R	                  X45        XR
                  ;   a  U R                  R	                  X45        Uc  Ub!  U R                  X4   R                  X445        gg)z@Add an arc, including message fragments to use if it is missing.zAdding possible arc: (z, z): z

)rJ   N)	rV  rZ   r   r˜   rb   rR  rT  r°   rË   rð   s        r-   rù   ÚAstArcAnalyzer.add_arcÖ  s¢   € ð �:�:ÜÐ*¨5¨'°°C°5¸Ð<MÑ;PÐPRÐS]ÑR`ÐaÔbÜ”+“- VÒ,Ø�	‰	�‰�u�lÔ#Ø×,Ñ,Ó,Ø×Ñ×!Ñ! 5 ,Ô/àÑ(¨JÑ,BØ×&Ñ&¨ |Ñ4×;Ñ;Ð=NÐ<[Õ\ð -CrO   c                ó,   • [        U R                  5      $ )z.Yield the blocks in nearest-to-farthest order.)ÚreversedrQ  rª   s    r-   Únearest_blocksÚAstArcAnalyzer.nearest_blocksè  s   € ä˜×(Ñ(Ó)Ð)rO   c                ó  • UR                   R                  n[        [        [        [
        R                  /[        4      [        U SU 3S5      5      nUb	  U" U5      nOUR                  nU R                  R                  XD5      $ )zmWhat is the right line number to use for this node?

This dispatches to _line__Node functions where needed.

Ú_line__N)r[  rÝ   r
   r   r   rh   ÚASTr   r\  rV   rL  r6   )r+   rˆ   r]  ÚhandlerÚlines        r-   rj  ÚAstArcAnalyzer.line_for_nodeì  sw   € ð —N‘N×+Ñ+ˆ	ÜÜ”XœsŸw™w˜i¬Ð0Ñ1Ñ2Ü�D˜G I ;Ð/°Ó6ó
ˆð ÑÙ˜4“=‰Dà—;‘;ˆDØ�~‰~×!Ñ! $Ó-Ð-rO   c                óv   • UR                   (       a  UR                   S   R                  nU$ UR                  nU$ )zSCompute first line number for things that can be decorated (classes and functions).r   )rw   rV   )r+   rˆ   rV   s      r-   Ú_line_decoratedÚAstArcAnalyzer._line_decorated  s8   € à××Ø×(Ñ(¨Ñ+×2Ñ2ˆFð ˆð —[‘[ˆFØˆrO   c                ó8   • U R                  UR                  5      $ r4   )rj  rq   ©r+   rˆ   s     r-   Ú_line__AssignÚAstArcAnalyzer._line__Assign
  s   € Ø×!Ñ! $§*¡*Ó-Ð-rO   c                óÀ   • UR                   (       aB  UR                   S   b  UR                   S   R                  $ UR                  S   R                  $ UR                  $ ©Nr   )ÚkeysrV   r=  r…  s     r-   Ú_line__DictÚAstArcAnalyzer._line__Dict  sK   € Ø�9�9Ø�y‰y˜‰|Ñ'Ø—y‘y ‘|×*Ñ*Ð*ð —{‘{ 1‘~×,Ñ,Ð,à—;‘;ÐrO   c                óx   • UR                   (       a  U R                  UR                   S   5      $ UR                  $ r‰  )Úeltsrj  rV   r…  s     r-   Ú_line__ListÚAstArcAnalyzer._line__List  s,   € Ø�9�9Ø×%Ñ% d§i¡i°¡lÓ3Ð3à—;‘;ÐrO   c                ó   • g)Nr;   rå   r…  s     r-   Ú_line__ModuleÚAstArcAnalyzer._line__Module#  s   € ØrO   >   rp   ÚPassÚAssertÚAssignÚDeleteÚGlobalÚImportÚNonlocalÚ	AnnAssignÚ	AugAssignÚ
ImportFromc                ón  • UR                   R                  n[        [        [        [
        R                  /[        [           4      [        U SU 3S5      5      nUb
  U" U5      nU$ [        R                  (       a  X R                  ;  a  [        SU 35      e[        U R                  U5      5      1nU$ )a¾  Find the set of arc starts that exit this node.

Return a set of ArcStarts, exits from this node to the next. Because a
node represents an entire sub-tree (including its children), the exits
from a node can be arbitrarily complex::

    if something(1):
        if other(2):
            doit(3)
        else:
            doit(5)

There are three exits from line 1: they start at lines 1, 3 and 5.
There are two exits from line 2: lines 3 and 5.

Ú	_handle__Nz*** Unhandled: )r[  rÝ   r
   r   r   rh   r}  r    ré   r\  r   ÚTESTINGÚOK_TO_DEFAULTÚRuntimeErrorrj  )r+   rˆ   r]  r~  Ú
arc_startss        r-   Ú
node_exitsÚAstArcAnalyzer.node_exits5  s¬   € ð" —N‘N×+Ñ+ˆ	ÜÜ”XœsŸw™w˜i¬¬X©Ð6Ñ7Ñ8Ü�D˜I i [Ð1°4Ó8ó
ˆð ÑÙ  ›ˆJð Ðô �{�{Ø×$6Ñ$6Ó6Ü&¨¸¸Ð'?Ó@Ð@ô # 4×#5Ñ#5°dÓ#;Ó<Ð=ˆJØÐrO   c                ó  • Uc  Uc  [        5       nO	U1nOUb   eU He  nU R                  U5      nXPR                  ;  a  M%  U H)  nU R                  UR                  XVR
                  5        M+     U R                  U5      nMg     U$ )a›  Process the body of a compound statement.

`body` is the body node to process.

`from_start` is a single `ArcStart` that starts an arc into this body.
`prev_starts` is a set of ArcStarts that can all be the start of arcs
into this body.  Only one of `from_start` and `prev_starts` should be
given.

Records arcs within the body by calling `self.add_arc`.

Returns a set of ArcStarts, the exits from this body.

)r    rj  r!   rù   rV   rë   r¤  )r+   ro   Ú
from_startÚprev_startsÚ	body_noderV   Ú
prev_starts          r-   rk  ÚAstArcAnalyzer.process_bodyX  s�   € ð( ÑØÑ!Ü!›e‘à)˜l‘àÑ%Ð%Ð%ó ˆIØ×'Ñ'¨	Ó2ˆFØŸ_™_Ó,ÙÛ)�
Ø—‘˜Z×.Ñ.°×8HÑ8HÖIñ *àŸ/™/¨)Ó4ŠKñ ð ÐrO   c                óv   • U R                  5        H%  nUR                  XR                  5      (       d  M%    g   g)z0Add arcs due to jumps from `exits` being breaks.N)ry  rú   rù   ©r+   rø   Úblocks      r-   rú   Ú"AstArcAnalyzer.process_break_exits‡  ó-   € à×(Ñ(Ö*ˆEØ×(Ñ(¨·±×=Ó=Ùò +rO   c                óv   • U R                  5        H%  nUR                  XR                  5      (       d  M%    g   g)z3Add arcs due to jumps from `exits` being continues.N)ry  rþ   rù   r­  s      r-   rþ   Ú%AstArcAnalyzer.process_continue_exits�  s-   € à×(Ñ(Ö*ˆEØ×+Ñ+¨E·<±<×@Ó@Ùò +rO   c                óv   • U R                  5        H%  nUR                  XR                  5      (       d  M%    g   g)z0Add arcs due to jumps from `exits` being raises.N)ry  r  rù   r­  s      r-   r  Ú"AstArcAnalyzer.process_raise_exits“  r°  rO   c                óv   • U R                  5        H%  nUR                  XR                  5      (       d  M%    g   g)z1Add arcs due to jumps from `exits` being returns.N)ry  r  rù   r­  s      r-   r  Ú#AstArcAnalyzer.process_return_exits™  s-   € à×(Ñ(Ö*ˆEØ×)Ñ)¨%·±×>Ó>Ùò +rO   c                óp   • U R                  U5      n[        USS9nU R                  U15        [        5       $ )Nz*the break on line {lineno} wasn't executed©rë   )rj  ré   rú   r    )r+   rˆ   ÚhereÚbreak_starts       r-   Ú_handle__BreakÚAstArcAnalyzer._handle__Breakª  s6   € Ø×!Ñ! $Ó'ˆÜ˜tÐ+WÑXˆØ× Ñ  + Ô/Ü‹uˆrO   c                ó˜  • UR                   nUR                   nUR                  nU(       a�  SnU H/  nU R                  U5      nUb  Xc:w  a  U R                  X65        UnM1     Uc   eU R                  X25        UnUR                  (       d/   SUR                  < SU R
                   SUR                    35       eUc   e[        U5      1$ )zBAdd arcs for things that can be decorated (classes and functions).NzOops: node.body = z in Ú@)rV   rw   rj  rù   ro   r   ré   )r+   rˆ   Ú	main_lineÚlastÚdecsÚdec_nodeÚ	dec_starts          r-   Ú_handle_decoratedÚ AstArcAnalyzer._handle_decorated°  sÈ   € à!Ÿ[™[ˆ	Ø#Ÿ{™{ˆØ×"Ñ"ˆÞØˆDÛ �Ø ×.Ñ.¨xÓ8�	ØÑ#¨	Ó(9Ø—L‘L Ô1Ø ’ñ	 !ð
 Ñ#Ð#Ð#Ø�L‰L˜Ô)ØˆDð
 —9—9ÐVÐ 3 t§y¡y¡n°D¸¿¹¸ÀqÈÏÉÈÐVÓV�9àÑÐÐÜ˜“ÐÐrO   c                óp   • U R                  U5      n[        USS9nU R                  U15        [        5       $ )Nz-the continue on line {lineno} wasn't executedr¸  )rj  ré   rþ   r    )r+   rˆ   r¹  Úcontinue_starts       r-   Ú_handle__ContinueÚ AstArcAnalyzer._handle__ContinueÊ  s7   € Ø×!Ñ! $Ó'ˆÜ! $Ð.]Ñ^ˆØ×#Ñ# ^Ð$4Ô5Ü‹uˆrO   c                ó8  • U R                  UR                  5      nU R                  R                  [	        US95        [        USS9nU R                  UR                  US9nU H)  nU R                  UR                  X%R                  5        M+     U R                  R                  5       n[        U[        5      (       d   eUR                  n[        USS9nUR                  (       a   U R                  UR                  US9nXG-  nU$ UR                  U5        U$ )N©rI   z'the loop on line {lineno} never startedr¸  ©r§  z)the loop on line {lineno} didn't complete)rj  ÚiterrQ  rË   r
  ré   rk  ro   rù   rV   rë   rb  rj   r  Úorelserb   )r+   rˆ   rI   r§  rø   r  Úmy_blockÚ
else_exitss           r-   Ú_handle__ForÚAstArcAnalyzer._handle__ForÐ  sö   € Ø×"Ñ" 4§9¡9Ó-ˆØ×Ñ×Ñ¤	°Ñ 6Ô7Ü˜eÐ+TÑUˆ
Ø×!Ñ! $§)¡)¸
Ð!ÐCˆãˆCØ�L‰L˜Ÿ™ U¯I©IÖ6ñ à×#Ñ#×'Ñ'Ó)ˆÜ˜(¤I×.Ñ.Ð.Ð.Ø×$Ñ$ˆÜ˜eÐ+VÑWˆ
Ø�;�;Ø×*Ñ*¨4¯;©;À:Ð*ÐNˆJØÑˆEð ˆð �I‰I�jÔ!ØˆrO   c                óN  • U R                  UR                  5      n[        UR                  5      u  p4[        5       nU(       a  U(       a&  [	        USS9nXPR                  UR                  US9-  nU(       a  U(       d&  [	        USS9nXPR                  UR                  US9-  nU$ )Nú-the condition on line {lineno} was never truer¸  rÌ  ú.the condition on line {lineno} was always true)rj  Útestr:  r    ré   rk  ro   rÎ  )r+   rˆ   rI   Úconstant_testrB  rø   r§  s          r-   Ú_handle__IfÚAstArcAnalyzer._handle__Ifé  s�   € Ø×"Ñ" 4§9¡9Ó-ˆÜ2°4·9±9Ó=ÑˆÜ“ˆÞ¦Ü! %Ð/^Ñ_ˆJØ×&Ñ& t§y¡y¸ZÐ&ÐHÑHˆEÞ¦CÜ! %Ð/_Ñ`ˆJØ×&Ñ& t§{¡{¸zÐ&ÐJÑJˆEØˆrO   c                óZ  • U R                  U5      nUn[        5       nUR                   HX  nU R                  UR                  5      nU R	                  X6S5        [        USS9nX@R                  UR                  US9-  nUnMZ     WR                  n[        U[        R                  5      (       a0  UR                  S   n[        U[        R                  5      (       a  M0  [        U[        R                  5      (       aG  UR                  b:  UR                  n[        U[        R                  5      (       a  UR                  b  M:  [        U[        R                  5      =(       a#    UR                  S L =(       a    UR                  S L n	U	(       d  UR                  [        WSS95        U$ )Nz+the pattern on line {lineno} always matchedz*the pattern on line {lineno} never matchedr¸  rÌ  éÿÿÿÿ)rj  r    ÚcasesÚpatternrù   ré   rk  ro   rj   rh   ÚMatchOrÚpatternsÚMatchAsÚguardrb   )
r+   rˆ   rI   rF   rø   ÚcaseÚ
case_startr§  rÝ  Úhad_wildcards
             r-   Ú_handle__MatchÚAstArcAnalyzer._handle__Matchõ  sU  € Ø×"Ñ" 4Ó(ˆØˆ
Ü“ˆØ—J”JˆDØ×+Ñ+¨D¯L©LÓ9ˆJØ�L‰L˜Ð1^Ô_Ü!ØØBñˆJð ×&Ñ& t§y¡y¸ZÐ&ÐHÑHˆEØ#ŠJñ ð —,‘,ˆÜ˜¤#§+¡+×.Ñ.Ø×&Ñ& rÑ*ˆGô ˜¤#§+¡+×.Ó.ä˜¤#§+¡+×.Ñ.°7·?±?Ñ3NØ—o‘oˆGô ˜¤#§+¡+×.Ñ.°7·?±?Ó3Nô �w¤§¡Ó,×_°·±ÀDÐ1H×_ÈTÏZÉZÐ[_ÐM_ð 	ö Ø�I‰IÜ˜Ð+XÑYôð ˆrO   c                óp   • U R                  U5      n[        USS9nU R                  U15        [        5       $ )Nz*the raise on line {lineno} wasn't executedr¸  )rj  ré   r  r    )r+   rˆ   r¹  Úraise_starts       r-   Ú_handle__RaiseÚAstArcAnalyzer._handle__Raise  s6   € Ø×!Ñ! $Ó'ˆÜ˜tÐ+WÑXˆØ× Ñ  + Ô/ä‹uˆrO   c                óp   • U R                  U5      n[        USS9nU R                  U15        [        5       $ )Nz+the return on line {lineno} wasn't executedr¸  )rj  ré   r  r    )r+   rˆ   r¹  Úreturn_starts       r-   Ú_handle__ReturnÚAstArcAnalyzer._handle__Return  s6   € Ø×!Ñ! $Ó'ˆÜ Ð,YÑZˆØ×!Ñ! < .Ô1ä‹uˆrO   c                óÂ  • UR                   (       a  U R                  UR                   S   5      nOS nUR                  (       a  U R                  UR                  S   5      nOS nUc  Uc   e[        X#5      nU R                  R                  U5        U R                  U5      nU R                  UR                  [        U5      S9nUR                  (       a  S Ul	        OU R                  R                  5         [        5       nUR                   (       aK  UR                    H;  nU R                  U5      nSn	[        X)S9n
XpR                  UR                  U
S9-  nM=     UR                  (       a  U R                  UR                  US9nXg-  nUR                  (       a?  U R                  R                  5         UnU R                  UR                  US9nU(       a  UnU$ )Nr   rÌ  z3the exception caught by line {lineno} didn't happenr¸  )r¨  )Úhandlersrj  Ú	finalbodyr"  rQ  rË   rk  ro   ré   r$  rb  r    rÎ  )r+   rˆ   r$  r%  Ú	try_blockrI   rø   Úhandler_exitsÚhandler_nodeÚ
from_causer§  Ú
final_fromÚfinal_exitss                r-   Ú_handle__TryÚAstArcAnalyzer._handle__Try!  s—  € Ø�=�=Ø ×.Ñ.¨t¯}©}¸QÑ/?Ó@‰Mà ˆMà�>�>Ø×,Ñ,¨T¯^©^¸AÑ->Ó?‰KàˆKð Ñ(¨KÑ,CÐCÐCÜ˜]Ó8ˆ	Ø×Ñ×Ñ 	Ô*à×"Ñ" 4Ó(ˆØ×!Ñ! $§)¡)¼À»Ð!ÐHˆð
 �>�>Ø&*ˆIÕ#à×Ñ× Ñ Ô"ä'*£uˆà�=�=Ø $§¤�Ø $× 2Ñ 2°<Ó @�ØR�
Ü% mÑF�
Ø×!2Ñ!2°<×3DÑ3DÐQ[Ð!2Ð!\Ñ\’ñ	 !.ð �;�;Ø×%Ñ% d§k¡k¸uÐ%ÐEˆEàÑˆà�>�>Ø×Ñ× Ñ Ô"ØˆJà×+Ñ+¨D¯N©NÈ
Ð+ÐSˆKæð $�àˆrO   c                ó¨  • U R                  UR                  5      =p#[        UR                  5      u  pEU R                  R	                  [        US95        [        USS9nU R                  UR                  US9nU H)  nU R                  UR                  X8R                  5        M+     [        5       nU R                  R                  5       n	[        U	[
        5      (       d   eUR                  U	R                   5        [        USS9nUR"                  (       a   U R                  UR"                  US9n
Xz-  nU$ U(       d  UR%                  U5        U$ )NrË  rÔ  r¸  rÌ  rÕ  )rj  rÖ  r:  rQ  rË   r
  ré   rk  ro   rù   rV   rë   r    rb  rj   rB   r  rÎ  rb   )r+   rˆ   rI   Úto_topr×  r‚   r§  rø   r  rÏ  rÐ  s              r-   Ú_handle__WhileÚAstArcAnalyzer._handle__WhileZ  s  € Ø×+Ñ+¨D¯I©IÓ6Ð6ˆÜ0°·±Ó;ÑˆØ×Ñ×Ñ¤	°Ñ 7Ô8Ü˜eÐ+ZÑ[ˆ
Ø×!Ñ! $§)¡)¸
Ð!ÐCˆÛˆCØ�L‰L˜Ÿ™ V¯Y©YÖ7ñ ä“ˆØ×#Ñ#×'Ñ'Ó)ˆÜ˜(¤I×.Ñ.Ð.Ð.Ø�‰�X×)Ñ)Ô*Ü˜eÐ+[Ñ\ˆ
Ø�;�;Ø×*Ñ*¨4¯;©;À:Ð*ÐNˆJØÑˆEð
 ˆö !Ø—	‘	˜*Ô%ØˆrO   c                ó¨  • [         R                  R                  (       a5  UR                   Vs/ s H  o R	                  UR
                  5      PM     nnOU R	                  U5      /nU H9  nU R                  R                  U5        U R                  R                  U5        M;     U R                  UR                  [        US   5      S9nUS   nU R                  R                  U5        [        U5      1nU(       aN  U HF  nU R                  UR                  U5        U R                  R                  UR                  U45        MH     UnU$ s  snf )NrÛ  rÌ  )r   Ú
PYBEHAVIORÚexit_with_through_ctxmgrÚitemsrj  Úcontext_exprrR  rb   rS  rk  ro   ré   Úremoverù   rV   rU  )r+   rˆ   Úitemr¥   rI   rø   Ú	with_exitr  s           r-   Ú_handle__WithÚAstArcAnalyzer._handle__Withp  s  € Ü�>‰>×2×2ØHLÏ
Ê
ÓSÊ
À×(Ñ(¨×):Ñ):Ö;É
ˆFÐSˆFà×(Ñ(¨Ó.Ð/ˆFÛˆEØ×$Ñ$×(Ñ(¨Ô/Ø× Ñ ×$Ñ$ UÖ+ñ ð ×!Ñ! $§)¡)¼ÀÈÁÓ8LÐ!ÐMˆà�r‘
ˆØ× Ñ ×'Ñ'¨Ô.Ü˜e“_Ð%ˆ	ÞÛ�Ø—‘˜SŸZ™Z¨Ô/Ø—‘×#Ñ# S§Z¡Z°Ð$7Ö8ñ ð ˆEàˆùò% Ts   ®$E)rS  r˜   rQ  rR  rV  r   r°   rL  rK  r!   rT  rU  )
r   rs   rK  úast.ASTr!   rÙ   rL  zdict[TLineNo, TLineNo]r×   rØ   rÚ   )r×   zdict[TArc, tuple[TArc, TArc]])rˆ   ú
ast.Moduler×   rØ   )rˆ   úast.FunctionDefr×   rØ   )rˆ   zast.ClassDefr×   rØ   rÊ   ró   )r×   zIterable[Block])rˆ   r  r×   r   )rˆ   r
  r×   r   )rˆ   z
ast.Assignr×   r   )rˆ   zast.Dictr×   r   )rˆ   zast.Listr×   r   )rˆ   r	  r×   r   )rˆ   r  r×   r  )ro   zSequence[ast.AST]r§  zArcStart | Noner¨  zset[ArcStart] | Noner×   r  )rø   r  r×   rØ   )rˆ   z	ast.Breakr×   r  )rˆ   r
  r×   r  )rˆ   zast.Continuer×   r  )rˆ   zast.Forr×   r  )rˆ   zast.Ifr×   r  )rˆ   z	ast.Matchr×   r  )rˆ   z	ast.Raiser×   r  )rˆ   z
ast.Returnr×   r  )rˆ   zast.Tryr×   r  )rˆ   z	ast.Whiler×   r  )rˆ   zast.Withr×   r  )0rÝ   rÞ   rß   rà   rá   r.   r®   r¯   rm  rp  Ú_code_object__AsyncFunctionDefrs  rù   ry  rj  r‚  r†  Ú_line__ClassDefr‹  Ú_line__FunctionDefÚ_line__AsyncFunctionDefr�  r’  r¡  r¤  rk  rú   rþ   r  r  r»  rÄ  Ú_handle__ClassDefrÈ  rÑ  Ú_handle__AsyncForÚ_handle__FunctionDefÚ_handle__AsyncFunctionDefrØ  rå  ré  rí  rø  Ú_handle__TryStarrü  r  Ú_handle__AsyncWithrä   rå   rO   r-   r­   r­   [  s™  † ñð($Fàð$Fð ð$Fð !ð	$Fð
 *ð$Fð 
ô$FôL*ôô>(ôð &?Ð"ôUð )-Ø!%ð]àð]ð ð]ð &ð	]ð
 ð]ð 
õ]ô$*ô.ô,ô.ð &€Oô	ð )ÐØ-Ðôôò€Mô!ðL '+Ø,0ð	%àð%ð $ð%ð *ð	%ð
 
õ%ô^ôôôô"ô ð0 *Ðôôð( %Ðà,ÐØ 1Ðô
ôô<ôô5ðn $Ðôô,ð, 'ÓrO   r­   )rˆ   r  r×   ztuple[bool, bool])3rá   Ú
__future__r   rh   rÀ   râ   rM  r=   r]   r[   Úcollections.abcr   r   r   Údataclassesr   Útypingr   r	   r
   Úcoverager   Úcoverage.bytecoder   Úcoverage.debugr   Úcoverage.exceptionsr   r   Úcoverage.miscr   r   Úcoverage.phystokensr   Úcoverage.typesr   r   r   ré   rî   ÚdictrP  Útuplers   ÚTArcFragmentsrõ   r
  r  r"  r:  r­   rå   rO   r-   Ú<module>r#     sñ   ðñ $å "ã 
Û Û Û 	Û 	Û Û ß 8Ñ 8Ý !ß +Ñ +å Ý (Ý &ß 3ß 3Ý /ß (á�BÓ€÷~ñ ~ñL �$˜dÑ#÷ð ó $ðôD�ô ð. �T˜4  h¨s¡m°X¸c±]Ð&BÑ CÑDÐDÑE€÷ñ ô8�ô ô&�Eô ô<ˆuô ô&÷4k'ò k'rO   