ó
    ÷Þ jCº  ã                  ó8  • 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	J
r
Jr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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 jr#S%S jr$ " S S5      r%\" SSS9 " S S5      5       r& " S S\5      r'\(\!\)\*\+S-  \+S-  4      4   r, " S S5      r- " S S\-5      r. " S S\-5      r/ " S S\-5      r0\Rb                  \Rd                  \Rf                  4r4S&S  jr5S'S! jr6 " S" S#5      r7g)(zCode parsing for coverage.py.é    )ÚannotationsN)ÚCallableÚIterableÚSequence)Ú	dataclass)ÚProtocolÚcast)Úenv)Ú
ByteParser)Úshort_stack)ÚNoSourceÚ	NotPython)Úisolate_moduleÚ	nice_pair)Úgenerate_tokens)ÚTArcÚTLineNoc                ó  • 0 nSnU  H€  u  p4u  pVu  n  nU[         R                  :X  a'  U(       a  Xr:w  a  [        X'S-   5       H  nX!U'   M	     SnUR                  5       (       d  M_  U[        R
                  :w  d  Mu  U(       a  M~  UnM‚     U$ )a€  Compute the multiline map from a stream of tokens.

The result maps line numbers in multi-line statements to the first line
number of their statement.  This is the only place the map is computed:
`PythonParser._raw_parse` uses it for parsing and reporting, and the
sys.monitoring core uses `multiline_map_from_text` to get the map without
paying for a full parse during measurement.

r   é   )ÚtokenÚNEWLINEÚrangeÚstripÚtokenizeÚCOMMENT)	ÚtokensÚmultiline_mapÚ
first_lineÚtoktypeÚttextÚslinenoÚ_ÚelinenoÚlinenos	            ÚI/var/www/html/gaurav/venv/lib/python3.13/site-packages/coverage/parser.pyÚmultiline_map_from_tokensr&      sˆ   € ð -/€Mà€JÛ9?Ñ5ˆ™˜¡l w°°AØ”e—m‘mÓ#Þ˜gÓ3ô $ J¸!±Ö<�FØ,6 &Ó)ñ =àˆJØ�;‰;�=‹=˜W¬×(8Ñ(8Õ8ç�:Ø$’
ñ :@ð Ðó    c                ó*   • [        [        U 5      5      $ )z©Compute just the multiline map for `text`, without a full parse.

Can raise tokenize.TokenError, IndentationError, or SyntaxError if the
text isn't parsable as Python.

)r&   r   )Útexts    r%   Úmultiline_map_from_textr*   :   s   € ô %¤_°TÓ%:Ó;Ð;r'   c                  óÆ   • \ rS rSrSr   S       SS j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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SS jrSrg) ÚPythonParseréD   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        0 U l        S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)Úfilenamer)   Úcoverage.pythonr/   ÚOSErrorr   ÚexcludeÚ	_ast_rootÚsetÚ
statementsÚexcludedÚraw_statementsÚraw_excludedÚraw_docstringsÚshow_tokensr   Ú	_all_arcsÚ_missing_arc_fragmentsÚ_with_jump_fixersÚ_first_line_cacheÚ_exit_counts)Úselfr)   r0   r3   r/   Úerrs         r%   Ú__init__ÚPythonParser.__init__L   s  € ö –xÐMÐ!MÓMÐØ ×, HˆŒØÑØ!�Iå9ðYÙ-¨d¯m©mÓ<�”	ð Œð *.ˆŒô
 ),«ˆŒô '*£eˆŒô -0«EˆÔô +.«%ˆÔô -0«EˆÔð !ˆÔð 68ˆÔð ,0ˆŒØ<@ˆÔ#Ø@BˆÔà9;ˆÔØ7;ˆÕøôW ó YÜÐ!6°t·}±}°oÀSÈÈÐNÓOÐUXÐXûðYús   ·C Ã
DÃ"C>Ã>D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  óX   >#   • U H   nTR                   R                  X5      v •  M"     g 7f©N)r   Úget)Ú.0ÚirA   s     €r%   Ú	<genexpr>Ú.PythonParser.lines_matching.<locals>.<genexpr>ž   s)   øé € ð Ù6Y°�×"Ñ"×&Ñ& q×,Ð,Ò6Yùs   ƒ'*r   é   )	r5   ÚreÚfinditerr)   Ú	MULTILINEÚspanÚcountÚupdater   )
rA   ÚregexÚmatchesÚ
last_startÚlast_start_lineÚmatchÚstartÚendÚ
start_lineÚend_lines
   `         r%   Úlines_matchingÚPythonParser.lines_matchingŽ   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ð ˆr'   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      5      n[        U5      U l	        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O"U	S;   a  US	-  nOU[         R.                  :X  a  SnU	R1                  5       (       d  GMQ  U[        R2                  :w  d  GMh  SnU(       a  GMt  U
nU(       a  X::  a  SnU(       d  GMŽ  U R                  R-                  U5        GM¬     U(       dG  [5        U R
                  U R6                  S9nU R8                  R;                  UR=                  5       5        U R?                  U R                  5      U l        U R@                  c   e[C        U R@                  5       GH  n[E        U[F        RH                  [F        RJ                  [F        RL                  [F        RN                  45      (       aÛ  URP                  (       aÊ  URP                  S   n[E        U[F        RR                  5      (       aœ  [E        URT                  [F        RV                  5      (       as  [E        URT                  RT                  [X        5      (       aJ  U RZ                  R;                  [+        UR\                  [_        [`        URb                  5      S	-   5      5        [E        U[F        RH                  [F        RJ                  [F        RL                  45      (       d  GMm  [e        S URf                   5       UR\                  S9nU R                  R)                  [+        UUR\                  S	-   5      5      (       d  GMÌ  U R                  R;                  [+        U[_        [`        URb                  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)   r0   c              3  ó6   #   • U H  oR                   v •  M     g 7frI   ©r$   )rK   Úds     r%   rM   Ú*PythonParser._raw_parse.<locals>.<genexpr>	  s   é € Ð!HÑ4G¨q§(¦(Ò4Gùs   ‚)Údefault)4r3   r_   r9   r5   r7   r)   Úlistr   r&   r   r;   Úprintr   Útok_namerJ   r   r   ÚINDENTÚDEDENTÚOPÚintersectionr   Úaddr   r   r   r   r0   r8   rU   Úfind_statementsÚfirst_linesr4   Úwalk_statement_nodesÚ
isinstanceÚastÚClassDefÚFunctionDefÚAsyncFunctionDefÚModuleÚbodyÚExprÚvalueÚConstantÚstrr:   r$   r	   ÚintÚ
end_linenoÚminÚdecorator_list)rA   ÚindentÚexclude_indentÚ	excludingr   ÚemptyÚnestingr   r   r    r!   r"   r#   ÚltextÚshould_excludeÚ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Ñ$Ð$Ð$Ü”o d§i¡iÓ0Ó1ˆÜ6°vÓ>ˆÔÜ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Ó)ð �
à�{‰{�}Œ} ¬H×,<Ñ,<Ö!<à�ß!‘zà!(�Jæ  VÓ%=Ø$)˜	ß ‘yØŸ™×)Ñ)¨'×2ñ[ BHö` Ü$¨$¯)©)¸d¿m¹mÑLˆKØ×Ñ×&Ñ& {×'BÑ'BÓ'DÔEà×(Ñ(¨¯©Ó7ˆŒð �~‰~Ñ)Ð)Ð)Ü(¨¯©×8ˆ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×[ò% 9r'   c                óà   • U R                   R                  U5      nUcO  US:  a   U R                  R                  U* U* 5      * nOU R                  R                  X5      nX R                   U'   U$ )zAReturn the first line number of the statement including `lineno`.r   )r?   rJ   r   )rA   r$   r�   s      r%   r   ÚPythonParser.first_line  sl   € à×&Ñ&×*Ñ*¨6Ó2ˆØ‰=Ø˜‹zØ×+Ñ+×/Ñ/°°¸&¸ÓAÐA‘à×*Ñ*×.Ñ.¨vÓ>�Ø-2×"Ñ" 6Ñ*Øˆr'   c                óL   • 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   )rA   Úlinenosr$   s      r%   rs   ÚPythonParser.first_lines  s#   € ñ 7>Ó>±g¨F—‘ Ö'±gÑ>Ð>ùÒ>s   …!c                ó$   • U R                  U5      $ )z)Implement `FileReporter.translate_lines`.)rs   )rA   Úliness     r%   Útranslate_linesÚPythonParser.translate_lines!  s   € à×Ñ Ó&Ð&r'   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   )rA   Ú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.

r$   r   r   zCouldn't parse 'z' as Python source: z	 at line N)rv   Úparser)   r4   rŽ   r   Ú
TokenErrorÚIndentationErrorÚSyntaxErrorÚhasattrr$   Úargsr   r0   r7   r:   r8   rs   r6   )rA   rB   r$   Ú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©rA   s    r%   r›   ÚPythonParser.arcsA  s4   € ð �>‰>Ñ!Ø×ÑÔØ�~‰~Ñ)Ð)Ð)Ø�~‰~Ðr'   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        SU l         g)z[Run the AstArcAnalyzer and save its results.

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

N)r4   ÚAstArcAnalyzerr0   r8   r   Úanalyzer›   Úwith_jump_fixersr>   rš   r5   r<   r   rq   Úmissing_arc_fragmentsr=   )rA   Úaaar›   Úl1Úl2Úfl1Úfl2s          r%   r¬   ÚPythonParser._analyze_astM  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 :Ö.ñ	 ð '*×&?Ñ&?ˆÔ#ð ˆ�r'   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   )r5   r>   rq   )rA   r›   Ú	to_removeÚto_addÚarcÚend0Ú
start_nextÚend_nexts           r%   rš   ÚPythonParser.fix_with_jumpsh  sÐ   € ô0 “Eˆ	Ü“ˆÛˆCØ×,Ñ,Õ,Ø˜1‘v�Ø—‘˜cÔ"Ø'+×'=Ñ'=¸cÑ'BÑ$�
Ø ×$:Ñ$:Ó:Ø—M‘M *Ô-Ø+/×+AÑ+AÀ*Ñ+MÑ(�JØ—M‘M (Ô+ð !×$:Ñ$:Õ:ð —
‘
˜D¨1¡+Ð.Ô/Ø—‘˜jÖ)ñ ô �D“	˜FÑ" iÑ/ˆØˆr'   c                ó>  • U R                   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     Xl         U R                   $ )zIGet a count of exits from that each line.

Excluded lines are excluded.

r   zl1=z  should be greater than zero in r   )r@   ÚcollectionsÚdefaultdictr€   r›   r0   r7   )rA   Úexit_countsrµ   r¶   s       r%   rÅ   ÚPythonParser.exit_counts�  s�   € ð ×ÑÑ$Ü.9×.EÒ.EÄcÓ.JˆKØŸ)™)ž+‘�Ø˜A“vÐV # "¡Ð&FÀtÇ}Á}ÀoÐVÓV�vØŸ™Ó&áØŸ™Ó&áØ“ 1Ñ$•ñ &ð !,Ôà× Ñ Ð r'   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}rf   )Úformat)rA   Ú
action_msgr\   s      r%   Ú_finish_action_msgÚPythonParser._finish_action_msg¥  s2   € àÑØ�Q‹wØ8‘
à4�
Ø×&Ñ&¨cÐ&Ð2ˆ
ØÐr'   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 rf   z or )r=   r¬   rJ   rÊ   rÈ   ÚappendÚjoin)rA   r[   r\   Ú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Ó Ð r'   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¬   rJ   rÊ   )rA   r[   r\   rÐ   rÉ   s        r%   Úarc_descriptionÚPythonParser.arc_descriptionÂ  sj   € à×&Ñ&Ñ.Ø×ÑÔØ×.Ñ.Ñ:Ð:Ð:à×4Ñ4×8Ñ8¸%¸ÈÀ~ÓVˆØ×,Ñ,¨^¸AÑ->¸qÑ-AÀ3ÓGˆ
ØÐr'   )r<   r4   r@   r?   r=   r>   r3   r7   r0   r   r:   r9   r8   r;   r6   r)   )NNN)r)   ú
str | Noner0   rÙ   r3   rÙ   ÚreturnÚNone)rV   r   rÚ   úset[TLineNo]©rÚ   rÛ   )r$   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Ù   r\   r   rÚ   r   )r[   r   r\   r   rÚ   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rC   r_   rŽ   r   rs   r—   rž   r©   r›   r¬   rš   rÅ   rÊ   rÔ   r×   Ú__static_attributes__© r'   r%   r,   r,   D   sŽ   † ñð  Ø#Ø"ð	@<àð@<ð ð@<ð ð	@<ð
 
õ@<ôDô.f\ôP	ô?ô'ôbô<ô0
ôô6&ôP!ô*ô!÷&r'   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   r$   Ú r   Úcauseræ   N)rà   rá   râ   rã   rä   Ú__annotations__rì   rå   ræ   r'   r%   rê   rê   Ò  s   ‡ ñð: ƒOØ€Eˆ3†Or'   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æ   ©rA   r[   r\   rÒ   rÉ   s        r%   Ú__call__ÚTAddArcFn.__call__ø  s   � r'   ræ   rÍ   ©
r[   r   r\   r   rÒ   rÙ   rÉ   rÙ   rÚ   rÛ   )rà   rá   râ   rã   rä   rò   rå   ræ   r'   r%   rï   rï   õ  sG   † Ù0ð )-Ø!%ðàðð ðð &ð	ð
 ðð 
÷ð r'   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æ   ©rA   ÚexitsÚadd_arcs      r%   Úprocess_break_exitsÚBlock.process_break_exits  ó   € àr'   c                ó   • g)zProcess continue exits.Fræ   rø   s      r%   Úprocess_continue_exitsÚBlock.process_continue_exits  rý   r'   c                ó   • g)zProcess raise exits.Fræ   rø   s      r%   Úprocess_raise_exitsÚBlock.process_raise_exits"  rý   r'   c                ó   • g)zProcess return exits.Fræ   rø   s      r%   Úprocess_return_exitsÚBlock.process_return_exits&  rý   r'   ræ   N©rù   úset[ArcStart]rú   rï   rÚ   Úbool)
rà   rá   râ   rã   rä   rû   rÿ   r  r  rå   ræ   r'   r%   rö   rö     s   † ñôôô÷r'   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 rI   )r[   r5   Úbreak_exits)rA   r[   s     r%   rC   ÚLoopBlock.__init__.  s   € àŒ
ä*-«%ˆÕr'   c                ó:   • U R                   R                  U5        g©NT)r  rU   rø   s      r%   rû   ÚLoopBlock.process_break_exits4  s   € Ø×Ñ×Ñ Ô&Ør'   c                óf   • U H+  nU" UR                   U R                  UR                  5        M-     gr  )r$   r[   rì   ©rA   rù   rú   Úxits       r%   rÿ   Ú LoopBlock.process_continue_exits8  s'   € ÛˆCÙ�C—J‘J §
¡
¨C¯I©IÖ6ñ àr'   )r  r[   N)r[   r   rÚ   rÛ   r  )	rà   rá   râ   rã   rä   rC   rû   rÿ   rå   ræ   r'   r%   r  r  +  s   † ÙJô0ô÷r'   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 rI   ©r[   Úname)rA   r[   r  s      r%   rC   ÚFunctionBlock.__init__A  s   € àŒ
à�	r'   c                ó†   • U H;  nU" UR                   U R                  * UR                  SU R                  < 35        M=     g)Nzexcept from function T©r$   r[   rì   r  r  s       r%   r  Ú!FunctionBlock.process_raise_exitsG  ó>   € ÛˆCÙØ—
‘
Ø—‘�Ø—	‘	Ø'¨¯	©	¡}Ð5ö	ñ ð r'   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_exitsQ  r  r'   )r  r[   N)r[   r   r  r   rÚ   rÛ   r  )	rà   rá   râ   rã   rä   rC   r  r  rå   ræ   r'   r%   r  r  >  s   † ÙHôô÷r'   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 rI   )Úhandler_startÚfinal_start)rA   r%  r&  s      r%   rC   ÚTryBlock.__init___  s   € à*Ôà&Õr'   c                ó€   • U R                   b1  U H+  nU" UR                  U R                   UR                  5        M-     gr  )r%  r$   rì   r  s       r%   r  ÚTryBlock.process_raise_exitse  s5   € Ø×ÑÑ)Û�Ù˜Ÿ
™
 D×$6Ñ$6¸¿	¹	ÖBñ àr'   )r&  r%  N)r%  úTLineNo | Noner&  r*  rÚ   rÛ   r  )rà   rá   râ   rã   rä   rC   r  rå   ræ   r'   r%   r#  r#  \  s   † Ù@ô'÷r'   r#  c              #  óæ   #   • U /nU(       ac  UR                  5       nUv •  [        R                  " U5       H+  n[        U[        5      (       d  M  UR                  U5        M-     U(       a  Mb  gg7f)a¨  Yield `root` and its descendant statement-level nodes.

Like ast.walk, but skips expression subtrees entirely, since statements
(including def and class) can never appear inside them.  This visits a
small fraction of the nodes ast.walk does, which matters when scanning
many files during reporting.

ExceptHandler and match_case nodes are also yielded; callers only
interested in particular node types must check for them.

N)Úpoprv   Úiter_child_nodesru   Ú_STMT_CONTAINERSrÎ   )ÚrootÚtodorŒ   Úchilds       r%   rt   rt   u  sW   é € ð ˆ6€DÞ
Ø�x‰x‹zˆØŠ
Ü×)Ò)¨$Ö/ˆEÜ˜%Ô!1×2Ó2Ø—‘˜EÖ"ñ 0÷ Š$ùs   ‚AA1ÁA1Á/A1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rI   ræ   )rK   Úis_constr"   s      r%   rM   Ú(is_constant_test_expr.<locals>.<genexpr>�  s   é € Ð?¹$©;¨8�hº$ùó   ‚c              3  ó(   #   • U H	  u  pUv •  M     g 7frI   ræ   )rK   r"   Úvs      r%   rM   r8     s   é € Ð3©d¡d a¥ªdùr9  )FF)rv   r~   r	  r}   ÚNameÚidÚevalÚUnaryOpru   ÚopÚNotÚis_constant_test_exprÚoperandÚBoolOpÚvaluesÚallÚOrÚany)rŒ   Úis_constantÚvalr;  Úretsr@  s         r%   rB  rB  Š  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   Ã;E4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	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\" S5      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_attributesr„   ÚCOVERAGE_TRACK_ARCS)r0   Ú	root_noderJ   r6   Ú	multiliner	  r€   ÚosÚgetenvrk   rv   Údumpr5   r›   rÃ   rÄ   rj   r³   Úblock_stackÚcurrent_with_startsÚall_with_startsÚwith_entriesÚ
with_exitsÚdebug)rA   r0   rS  r6   rT  r$   Údump_asts          r%   rC   ÚAstArcAnalyzer.__init__¹  s  € ð !ŒØ"ŒÙGQÓRÁz¸VŸ=™=¨Ö8ÁzÑRˆŒØ"Œô œœ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 Ss   ‘E!c                óˆ  • [        U R                  5       H©  n[        U[        R                  [        R
                  45      (       a  U R                  U5        ME  [        U[        R                  5      (       a  U R                  U5        Mw  [        U[        R                  5      (       d  M˜  U R                  U5        M«     g)zFExamine the AST tree from `self.root_node` to determine possible arcs.N)rt   rS  ru   rv   rx   ry   Ú_code_object__FunctionDefrw   Ú_code_object__ClassDefrz   Ú_code_object__Module©rA   rŒ   s     r%   r±   ÚAstArcAnalyzer.analyzeß  s}   € ä(¨¯©Ö8ˆDÜ˜$¤§¡´#×2FÑ2FÐ G×HÑHØ×.Ñ.¨tÖ4Ü˜D¤#§,¡,×/Ñ/Ø×+Ñ+¨DÖ1Ü˜D¤#§*¡*×-Ó-Ø×)Ñ)¨$Ö/ò 9r'   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›   rZ  r[  Úlenr,  r\  )	rA   Úfixersr½   Ú
with_nextsr[   ÚnextsÚnxtÚendsr\   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(ÁC-Á&	C-Â5C2Ã	C2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_noder{   Úprocess_bodyrú   r$   rì   ©rA   rŒ   r[   rù   r  s        r%   rc  Ú#AstArcAnalyzer._code_object__Module  sd   € Ø×"Ñ" 4Ó(ˆØ�9�9Ø×%Ñ% d§i¡iÓ0ˆEÛ�Ø—‘˜SŸZ™Z¨%¨°·±Ð<MÖNò ð �L‰L˜ Õ'r'   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  )	ro  rX  rÎ   r  r  rp  r{   r  r,  )rA   rŒ   r[   rù   s       r%   ra  Ú(AstArcAnalyzer._code_object__FunctionDef  sc   € Ø×"Ñ" 4Ó(ˆØ×Ñ×Ñ¤°EÇ	Á	Ñ JÔKØ×!Ñ! $§)¡)Ó,ˆØ×!Ñ! %Ô(Ø×Ñ×ÑÕr'   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 )ro  rp  r{   rú   r$   rì   r  rq  s        r%   rb  Ú%AstArcAnalyzer._code_object__ClassDef  sW   € Ø×"Ñ" 4Ó(ˆØ×!Ñ! $§)¡)Ó,ˆÛˆCØ�L‰L˜Ÿ™ e V¨S¯Y©Y¸+ÀdÇiÁiÁ]Ð8SÖTò r'   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

)r\   N)	r]  rk   r   r›   rq   rY  r[  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r'   c                ó,   • [        U R                  5      $ )z.Yield the blocks in nearest-to-farthest order.)ÚreversedrX  r­   s    r%   Únearest_blocksÚAstArcAnalyzer.nearest_blocks1  s   € ä˜×(Ñ(Ó)Ð)r'   c                ó´   • UR                   R                  n[        U SU 3S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)Ú	__class__rà   Úgetattrr$   rT  rJ   )rA   rŒ   Ú	node_nameÚhandlerÚlines        r%   ro  ÚAstArcAnalyzer.line_for_node5  s\   € ð —N‘N×+Ñ+ˆ	Ü7>ØØ�i�[Ð!Øó8
ˆð
 ÑÙ˜4“=‰Dà—;‘;ˆDØ�~‰~×!Ñ! $Ó-Ð-r'   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   )rƒ   r$   )rA   rŒ   r$   s      r%   Ú_line_decoratedÚAstArcAnalyzer._line_decoratedL  s8   € à××Ø×(Ñ(¨Ñ+×2Ñ2ˆFð ˆð —[‘[ˆFØˆr'   c                ó8   • U R                  UR                  5      $ rI   )ro  r}   rd  s     r%   Ú_line__AssignÚAstArcAnalyzer._line__AssignT  s   € Ø×!Ñ! $§*¡*Ó-Ð-r'   c                óÀ   • UR                   (       aB  UR                   S   b  UR                   S   R                  $ UR                  S   R                  $ UR                  $ ©Nr   )Úkeysr$   rE  rd  s     r%   Ú_line__DictÚAstArcAnalyzer._line__DictY  sK   € Ø�9�9Ø�y‰y˜‰|Ñ'Ø—y‘y ‘|×*Ñ*Ð*ð —{‘{ 1‘~×,Ñ,Ð,à—;‘;Ðr'   c                óx   • UR                   (       a  U R                  UR                   S   5      $ UR                  $ rŒ  )Úeltsro  r$   rd  s     r%   Ú_line__ListÚAstArcAnalyzer._line__Listg  s,   € Ø�9�9Ø×%Ñ% d§i¡i°¡lÓ3Ð3à—;‘;Ðr'   c                ó   • g)Nr   ræ   rd  s     r%   Ú_line__ModuleÚAstArcAnalyzer._line__Modulem  s   € Ør'   )Ú	AnnAssignÚAssignÚAssertÚ	AugAssignÚDeleter|   ÚGlobalÚImportÚ
ImportFromÚNonlocalÚPassc                ó  • UR                   R                  n[        U SU 3S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
   ÚTESTINGÚOK_TO_DEFAULTÚRuntimeErrorrê   ro  )rA   rŒ   r�  r‚  Ú
arc_startss        r%   Ú
node_exitsÚAstArcAnalyzer.node_exits�  s�   € ð" —N‘N×+Ñ+ˆ	Ü=DØØ˜	�{Ð#Øó>
ˆð
 ÑÙ  ›ˆJð Ðô �{�{Ø×$6Ñ$6Ó6Ü&¨¸¸Ð'?Ó@Ð@ô # 4×#5Ñ#5°dÓ#;Ó<Ð=ˆJØÐr'   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.

)r5   ro  r6   rú   r$   rì   r§  )rA   r{   Ú
from_startÚprev_startsÚ	body_noder$   Ú
prev_starts          r%   rp  ÚAstArcAnalyzer.process_body¥  s�   € ð( ÑØÑ!Ü!›e‘à)˜l‘àÑ%Ð%Ð%ó ˆIØ×'Ñ'¨	Ó2ˆFØŸ_™_Ó,ÙÛ)�
Ø—‘˜Z×.Ñ.°×8HÑ8HÖIñ *àŸ/™/¨)Ó4ŠKñ ð Ðr'   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)r{  rû   rú   ©rA   rù   Úblocks      r%   rû   Ú"AstArcAnalyzer.process_break_exitsÔ  ó-   € à×(Ñ(Ö*ˆEØ×(Ñ(¨·±×=Ó=Ùò +r'   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)r{  rÿ   rú   r°  s      r%   rÿ   Ú%AstArcAnalyzer.process_continue_exitsÚ  s-   € à×(Ñ(Ö*ˆEØ×+Ñ+¨E·<±<×@Ó@Ùò +r'   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)r{  r  rú   r°  s      r%   r  Ú"AstArcAnalyzer.process_raise_exitsà  r³  r'   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)r{  r  rú   r°  s      r%   r  Ú#AstArcAnalyzer.process_return_exitsæ  s-   € à×(Ñ(Ö*ˆEØ×)Ñ)¨%·±×>Ó>Ùò +r'   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ì   )ro  rê   rû   r5   )rA   rŒ   ÚhereÚbreak_starts       r%   Ú_handle__BreakÚAstArcAnalyzer._handle__Break÷  s6   € Ø×!Ñ! $Ó'ˆÜ˜tÐ+WÑXˆØ× Ñ  + Ô/Ü‹uˆr'   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 Ú@)r$   rƒ   ro  rú   r{   r0   rê   )rA   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àÑÐÐÜ˜“ÐÐr'   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»  )ro  rê   rÿ   r5   )rA   rŒ   r¼  Úcontinue_starts       r%   Ú_handle__ContinueÚ AstArcAnalyzer._handle__Continue  s7   € Ø×!Ñ! $Ó'ˆÜ! $Ð.]Ñ^ˆØ×#Ñ# ^Ð$4Ô5Ü‹uˆr'   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©r[   z'the loop on line {lineno} never startedr»  ©rª  z)the loop on line {lineno} didn't complete)ro  ÚiterrX  rÎ   r  rê   rp  r{   rú   r$   rì   r,  ru   r  Úorelserq   )rA   rŒ   r[   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Ô!Øˆr'   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)ro  ÚtestrB  r5   rê   rp  r{   rÑ  )rA   rŒ   r[   Úconstant_testrJ  rù   rª  s          r%   Ú_handle__IfÚAstArcAnalyzer._handle__If6  s�   € Ø×"Ñ" 4§9¡9Ó-ˆÜ2°4·9±9Ó=ÑˆÜ“ˆÞ¦Ü! %Ð/^Ñ_ˆJØ×&Ñ& t§y¡y¸ZÐ&ÐHÑHˆEÞ¦CÜ! %Ð/_Ñ`ˆJØ×&Ñ& t§{¡{¸zÐ&ÐJÑJˆEØˆr'   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Ï  éÿÿÿÿ)ro  r5   ÚcasesÚpatternrú   rê   rp  r{   ru   rv   ÚMatchOrÚpatternsÚMatchAsÚguardrq   )
rA   rŒ   r[   rX   rù   ÚcaseÚ
case_startrª  rà  Úhad_wildcards
             r%   Ú_handle__MatchÚAstArcAnalyzer._handle__MatchB  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ôð ˆr'   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»  )ro  rê   r  r5   )rA   rŒ   r¼  Úraise_starts       r%   Ú_handle__RaiseÚAstArcAnalyzer._handle__Raise`  s6   € Ø×!Ñ! $Ó'ˆÜ˜tÐ+WÑXˆØ× Ñ  + Ô/ä‹uˆr'   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»  )ro  rê   r  r5   )rA   rŒ   r¼  Úreturn_starts       r%   Ú_handle__ReturnÚAstArcAnalyzer._handle__Returng  s6   € Ø×!Ñ! $Ó'ˆÜ Ð,YÑZˆØ×!Ñ! < .Ô1ä‹uˆr'   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«  )Úhandlersro  Ú	finalbodyr#  rX  rÎ   rp  r{   rê   r%  r,  r5   rÑ  )rA   rŒ   r%  r&  Ú	try_blockr[   rù   Úhandler_exitsÚhandler_nodeÚ
from_causerª  Ú
final_fromÚfinal_exitss                r%   Ú_handle__TryÚAstArcAnalyzer._handle__Tryn  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æð $�àˆr'   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Ø  )ro  rÙ  rB  rX  rÎ   r  rê   rp  r{   rú   r$   rì   r5   r,  ru   rU   r  rÑ  rq   )rA   rŒ   r[   Úto_toprÚ  r"   rª  rù   r  rÒ  rÓ  s              r%   Ú_handle__WhileÚAstArcAnalyzer._handle__While§  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ð
 ˆö !Ø—	‘	˜*Ô%Øˆr'   c                ó¦  • [         R                  R                  (       a4  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Úitemsro  Úcontext_exprrY  rq   rZ  rp  r{   rê   Úremoverú   r$   r\  )rA   rŒ   Úitemr¨   r[   rù   Ú	with_exitr  s           r%   Ú_handle__WithÚAstArcAnalyzer._handle__With½  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)rZ  r›   rX  rY  r]  r0   r³   rT  rS  r6   r[  r\  )
r0   r   rS  úast.ASTr6   rÜ   rT  údict[TLineNo, TLineNo]rÚ   rÛ   rÝ   )rÚ   zdict[TArc, tuple[TArc, TArc]])rŒ   ú
ast.ModulerÚ   rÛ   )rŒ   z&ast.FunctionDef | ast.AsyncFunctionDefrÚ   rÛ   )rŒ   zast.ClassDefrÚ   rÛ   rÍ   rô   )rÚ   zIterable[Block])rŒ   r  rÚ   r   )rŒ   úast.FunctionDefrÚ   r   )rŒ   z
ast.AssignrÚ   r   )rŒ   zast.DictrÚ   r   )rŒ   zast.ListrÚ   r   )rŒ   r  rÚ   r   )rŒ   r  rÚ   r  )r{   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ä   rC   r±   r²   rc  ra  rb  rú   r{  ro  r†  r‰  Ú_line__ClassDefrŽ  Ú_line__FunctionDefÚ_line__AsyncFunctionDefr’  r•  Ú	frozensetr¤  r§  rp  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æ   r'   r%   r°   r°   ¤  s›  † ñð($Fàð$Fð ð$Fð !ð	$Fð
 *ð$Fð 
ô$FôL0ôô>(ôôUð )-Ø!%ð]àð]ð ð]ð &ð	]ð
 ð]ð 
õ]ô$*ô.ô.ô.ð &€Oô	ð )ÐØ-Ðôôñ ð	
ó€Mô "ðN '+Ø,0ð	%àð%ð $ð%ð *ð	%ð
 
õ%ô^ôôôô"ô ð0 *Ðôôð( %Ðà,ÐØ 1Ðô
ôô<ôô5ðn $Ðôô,ð, 'Ór'   r°   )r   zIterable[tokenize.TokenInfo]rÚ   r  )r)   r   rÚ   r  )r/  r  rÚ   zIterable[ast.AST])rŒ   r  rÚ   ztuple[bool, bool])8rä   Ú
__future__r   rv   rÃ   rU  rP   r   r   Úcollections.abcr   r   r   Údataclassesr   Útypingr   r	   Úcoverager
   Úcoverage.bytecoder   Úcoverage.debugr   Úcoverage.exceptionsr   r   Úcoverage.miscr   r   Úcoverage.phystokensr   Úcoverage.typesr   r   r&   r*   r,   rê   rï   Údictrj   Útupler   ÚTArcFragmentsrö   r  r  r#  ÚstmtÚexcepthandlerÚ
match_caser.  rt   rB  r°   ræ   r'   r%   Ú<module>r*     s  ðñ $å "ã 
Û Û 	Û 	Û Û ß 8Ñ 8Ý !ß !å Ý (Ý &ß 3ß 3Ý /ß (á�BÓ€ôô:<÷Fñ Fñ\ �$˜dÑ#÷ð ó $ðôD�ô ð. �T˜4  c¨D¡j°#¸±*Ð&<Ñ =Ñ>Ð>Ñ?€÷ñ ô8�ô ô&�Eô ô<ˆuô ð, —H‘H˜c×/Ñ/°·±Ð@Ð ô#ô*÷4o'ò o'r'   