ó
    àÅŸgq  ã                  óÄ   • 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  SSKJr  SSKJrJr  \\	R"                     rSS jrSS jrSS	 jrSS
 jrSS jrg)z"Better tokenizing for coverage.py.é    )ÚannotationsN)ÚIterable)Úenv)ÚTLineNoÚTSourceTokenLinesc           	   #  óØ  #   • SnSnSnU  GHY  u  pEu  pgu  p‰n
X(:w  Ga  U(       aø  UR                  S5      (       aâ  SnUR                  S5      (       a  SnOU[        R                  :X  aA  UR                  S5      (       a(  UR                  S5      R                  U5      (       a  SnO-SnO*[        R
                  S	:¼  a  U[        R                  :X  a  SnU(       aA  [        UR                  S
5      S   5      S-
  n[        R                  " SSXl4XlS-   4U5      v •  U
nU[        R                  [        R                  4;  a  Un[        R                  " XEXg4X‰4U
5      v •  UnGM\     g7f)a.  Return all physical tokens, even line continuations.

tokenize.generate_tokens() doesn't return a token for the backslash that
continues lines.  This wrapper provides those tokens so that we can
re-create a faithful representation of the original source.

Returns the same values as generate_tokens()

NéÿÿÿÿÚ z\
TÚ\Fz \
©é   é   Ú
éþÿÿÿé   iŸ† é   )ÚendswithÚtokenÚSTRINGÚrstripÚsysÚversion_infoÚFSTRING_MIDDLEÚlenÚsplitÚtokenizeÚ	TokenInfoÚNEWLINEÚNL)ÚtoksÚ	last_lineÚlast_linenoÚ
last_ttextÚttypeÚttextÚslinenoÚscolÚelinenoÚecolÚltextÚinject_backslashÚccols                ÚT/var/www/blue/EV-Temp_rev04/venv/lib/python3.13/site-packages/coverage/phystokens.pyÚ_phys_tokensr.      s_  é € ð !€IØ€KØ€JÜAEÑ=ˆ‘o�w¡¨¸ØÔ!Þ˜Y×/Ñ/°×7Ñ7ð  $(Ð Ø×&Ñ& t×,Ñ,Ø',Ñ$ØœeŸl™lÓ*Ø!×*Ñ*¨6×2Ñ2Ø!×(Ñ(¨Ó1×:Ñ:¸:×FÑFð ,0Ñ(ð ,1Ñ(Ü×%Ñ%¨Ó0°U¼e×>RÑ>RÓ5RØ',Ð$Þ#ä˜yŸ™¨tÓ4°RÑ8Ó9¸AÑ=�Dä"×,Ò,Ø˜vØ ˜¨'¸±6Ð):Ø!óò ð
 ˆIØœ×)Ñ)¬8¯;©;Ð7Ó7ØˆJÜ× Ò  °¨ÀÀÐQVÓWÒWØ‹òe BFùs   ‚E(E*c                ó0  • [        5       n[        R                  " [        R                  " U 5      5       HÝ  n[        R
                  S:¼  at  [        U[        R                  5      (       aU  UR                  UR                  5        UR                   H(  nUR                  UR                  R                  5        M*     M‹  [        R
                  S:¼  d  M¡  [        U[        R                  5      (       d  MÂ  UR                  UR                  5        Mß     U$ )zCHelper for finding lines with soft keywords, like match/case lines.©r   é
   r   )ÚsetÚastÚwalkÚparser   r   Ú
isinstanceÚMatchÚaddÚlinenoÚcasesÚpatternÚ	TypeAlias)ÚsourceÚsoft_key_linesÚnodeÚcases       r-   Úfind_soft_key_linesrA   [   s³   € ä#&£5€Nä—’œŸš 6Ó*Ö+ˆÜ×Ñ˜wÓ&¬:°d¼C¿I¹I×+FÑ+FØ×Ñ˜tŸ{™{Ô+ØŸ
œ
�Ø×"Ñ" 4§<¡<×#6Ñ#6Ö7ó #ä×Ñ Õ(¬Z¸¼c¿m¹m×-LÓ-LØ×Ñ˜tŸ{™{Ö+ñ ,ð Ðó    c              #  ó¤  #   • [         R                  [         R                  [         R                  [        R
                  1n/ nSnU R                  S5      R                  SS5      n [        U 5      n[        R                  R                  (       a  [        U 5      nO
[        5       n[        U5       GH�  u  pgu  p‰u  p«n
Sn[        R                   " SU5       GHV  nUS:X  a  Uv •  / nSnSnGO>US:X  a  SnGO4Xa;   a  SnGO+U(       a  X“:”  a  UR#                  S	S
X“-
  -  45        Sn[        R$                  R'                  US5      R)                  5       SS nU[         R*                  :X  a¬  [,        R.                  " U5      (       a  SnOŽ[0        R2                  S:¼  az  [        R                  R                  (       a[  [,        R4                  " U5      (       a@  [7        U5      S:X  a  SnO [7        U5      S:X  a  US   S   S	:X  a  SnOSnU(       a  X…;   a  SnUR#                  Xý45        SnSn	GMY     W(       d  GM‹  UnGM�     U(       a  Uv •  gg7f)aù  Generate a series of lines, one for each line in `source`.

Each line is a list of pairs, each pair is a token::

    [('key', 'def'), ('ws', ' '), ('nam', 'hello'), ('op', '('), ... ]

Each pair has a token class, and the token text.

If you concatenate all the token texts, and then join them with newlines,
you should have your original `source` back, with two differences:
trailing white space is not preserved, and a final line with no newline
is indistinguishable from a final line with a newline.

r   é   z
r   Tz(
)Fr
   ÚwsÚ ÚxxNr   Úkeyr0   r   )r   ÚINDENTÚDEDENTr   r   r   Ú
expandtabsÚreplaceÚgenerate_tokensr   Ú
PYBEHAVIORÚsoft_keywordsrA   r2   r.   Úrer   ÚappendÚtok_nameÚgetÚlowerÚNAMEÚkeywordÚ	iskeywordr   r   Úissoftkeywordr   )r=   Ú	ws_tokensÚlineÚcolÚtokgenr>   r$   r%   Úsliner'   Ú_r)   Ú
mark_startÚpartÚmark_endÚ	tok_classÚis_start_of_lines                    r-   Úsource_token_linesrd   j   sõ  é € ô  —‘œuŸ|™|¬U¯]©]¼H¿K¹KÐH€IØ"$€DØ
€Cà×Ñ˜qÓ!×)Ñ)¨&°$Ó7€FÜ˜VÓ$€Fä
‡~�~×#×#Ü,¨VÓ4‰ä›ˆä5AÀ&×5IÑ1ˆ‘m�u¡Y a°Øˆ
Ü—H’H˜V U×+ˆDØ�t‹|Ø’
Ø�Ø�Ø ’Ø˜“Ø ’ØÓ#Ø ’æ $£*Ø—K‘K  s¨d©jÑ'9Ð :Ô;Ø!&�JÜ$×-Ñ-×1Ñ1°%¸Ó>×DÑDÓFÀrÈÐJ�	ØœEŸJ™JÓ&Ü×(Ò(¨×/Ñ/à$)™	Ü×)Ñ)¨WÓ4ô Ÿ>™>×7×7¼G×<QÒ<QÐRW×<XÑ<Xä" 4›y¨A›~Ø37Ñ 0Ü"% d£)¨q£.°d¸1±g¸a±jÀDÓ6HØ37Ñ 0à38Ð 0Þ/°EÓ4KØ,1 	Ø—‘˜YÐ-Ô.Ø�Ø‹DñE ,÷F ‰8Ø‹CñM 6JöP Ø‹
ð ùs   ‚H5IÈ<Ic                ón   • [         R                  " U 5      R                  n[        R                  " U5      $ )z»A helper around `tokenize.generate_tokens`.

Originally this was used to cache the results, but it didn't seem to make
reporting go faster, and caused issues with using too much memory.

)ÚioÚStringIOÚreadliner   rM   )Útextrh   s     r-   rM   rM   ²   s)   € ô �{Š{˜4Ó ×)Ñ)€HÜ×#Ò# HÓ-Ð-rB   c                ó|   • [        U R                  S5      5      R                  n[        R                  " U5      S   $ )zžDetermine the encoding for `source`, according to PEP 263.

`source` is a byte string: the text of the program.

Returns a string, the name of the encoding.

Tr   )ÚiterÚ
splitlinesÚ__next__r   Údetect_encoding)r=   rh   s     r-   Úsource_encodingro   ½   s5   € ô �F×%Ñ% dÓ+Ó,×5Ñ5€HÜ×#Ò# HÓ-¨aÑ0Ð0rB   )r    Ú
TokenInfosÚreturnrp   )r=   Ústrrq   zset[TLineNo])r=   rr   rq   r   )ri   rr   rq   rp   )r=   Úbytesrq   rr   )Ú__doc__Ú
__future__r   r3   rf   rV   rP   r   r   r   Úcollections.abcr   Úcoverager   Úcoverage.typesr   r   r   rp   r.   rA   rd   rM   ro   © rB   r-   Ú<module>rz      sY   ðñ )å "ã 
Û 	Û Û 	Û 
Û Û å $å ß 5ð �h×(Ñ(Ñ)€
ô?ôDôEôP.õ	1rB   