ó
    Ð]jV  ã                  óÄ   • 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He  u  pEu  pgu  p‰n
X(:w  Ga  U(       G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O8SnO5[        R
                  R                  (       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Mh     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Úrstripr   Ú
PYBEHAVIORÚfstring_syntaxÚ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                ÚP/home/mande/repo/quber/.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Ø%×,Ñ,¨WÓ5×>Ñ>¸z×JÑJð ,0Ñ(ð ,1Ñ(Ü—^‘^×2×2°uÄ×@TÑ@TÓ7TØ',Ð$Þ#ä˜yŸ™¨tÓ4°RÑ8Ó9¸AÑ=�Dä"×,Ò,ØØØ ˜Ø ¨¡(Ð+Ø!óò ð ˆIØœ×)Ñ)¬8¯;©;Ð7Ó7ØˆJÜ× Ò  °¨ÀÀÐQVÓWÒWØ‹òm BFùs   ‚E4E6c                óö  • [        5       n[        R                  " [        R                  " U 5      5       GH?  n[	        U[        R
                  5      (       aU  UR                  UR                  5        UR                   H(  nUR                  UR                  R                  5        M*     Mx  [        R                  S:¼  a<  [	        U[        R                  5      (       a  UR                  UR                  5        MÈ  [        R                  S:¼  d  MÞ  [	        U[        R                  [        R                  45      (       d  GM  UR                  (       d  GM$  UR                  UR                  5        GMB     U$ )zCHelper for finding lines with soft keywords, like match/case lines.)é   é   )r-   é   )ÚsetÚastÚwalkÚparseÚ
isinstanceÚMatchÚaddÚlinenoÚcasesÚpatternÚsysÚversion_infoÚ	TypeAliasÚImportÚ
ImportFromÚis_lazy)ÚsourceÚsoft_key_linesÚnodeÚcases       r*   Úfind_soft_key_linesrD   ]   sê   € ä#&£5€Nä—’œŸš 6Ó*×+ˆô �dœCŸI™I×&Ñ&Ø×Ñ˜tŸ{™{Ô+ØŸ
œ
�Ø×"Ñ" 4§<¡<×#6Ñ#6Ö7ó #ä×Ñ Ó(¬Z¸¼c¿m¹m×-LÑ-LØ×Ñ˜tŸ{™{Ö+Ü×Ñ Õ(¬Z¸¼s¿z¹zÌ3Ï>É>Ð>Z×-[Ô-[Ø�|�|Š|Ø×"Ñ" 4§;¡;×/ñ ,ð Ðó    c              #  ó°  #   • [         R                  [         R                  [         R                  [        R
                  1n/ nSnU R                  S5      R                  SS5      n [        U 5      n[        U 5      n[        U5       GH½  u  pgu  p‰u  p«n
Sn[        R                  " SU5       GH†  nUS:X  a  Uv •  / nSnSnGOnUS:X  a  SnGOdXa;   a  SnGO[[        R                  R                  (       aD  U[         R                   :X  a0  UR                  S	S
5      R                  SS5      nU	[#        U5      -   n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  ay  [.        R0                  " U5      (       a  SnO[[.        R2                  " U5      (       a@  [#        U5      S:X  a  SnO [#        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M‰     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
   Ú{z{{Ú}z}}ÚwsÚ ÚxxNr-   Úkeyr   )r   ÚINDENTÚDEDENTr   r   r   Ú
expandtabsÚreplaceÚgenerate_tokensrD   r+   Úrer   r   r   r   r   r   ÚappendÚtok_nameÚgetÚlowerÚNAMEÚkeywordÚ	iskeywordÚissoftkeyword)r@   Ú	ws_tokensÚlineÚcolÚtokgenrA   r!   r"   Úsliner$   Ú_r&   Ú
mark_startÚpartÚmark_endÚ	tok_classÚis_start_of_lines                    r*   Úsource_token_linesrg   q   s	  é € ô  —‘œuŸ|™|¬U¯]©]¼H¿K¹KÐH€IØ"$€DØ
€Cà×Ñ˜qÓ!×)Ñ)¨&°$Ó7€FÜ˜VÓ$€Fä(¨Ó0€Nä5AÀ&×5IÑ1ˆ‘m�u¡Y a°Øˆ
Ü—H’H˜V U×+ˆDØ�t‹|Ø’
Ø�Ø�Ø ’Ø˜“Ø ’ØÓ#Ø ’ä—>‘>×0×0°U¼e×>RÑ>RÓ5RØŸ<™<¨¨TÓ2×:Ñ:¸3ÀÓE�DØ¤# d£)Ñ+�DÞ $£*Ø—K‘K  s¨d©jÑ'9Ð :Ô;Ø!&�JÜ$×-Ñ-×1Ñ1°%¸Ó>×DÑDÓFÀrÈÐJ�	ØœEŸJ™JÓ&Ü×(Ò(¨×/Ñ/à$)™	Ü ×.Ò.¨u×5Ñ5ä˜t›9¨›>Ø/3Ñ,Ü! $›i¨1›n°$°q±'¸!±*ÀÓ2DØ/3Ñ,à/4Ð,Þ+°Ó0GØ(-˜IØ—‘˜YÐ-Ô.Ø�Ø‹DñE ,÷F ‰8Ø‹CñM 6JöP Ø‹
ð ùs   ‚H;IÉ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   rR   )Útextrk   s     r*   rR   rR   ¶   s)   € ô �{Š{˜4Ó ×)Ñ)€HÜ×#Ò# HÓ-Ð-rE   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@   rk   s     r*   Úsource_encodingrr   Á   s5   € ô �F×%Ñ% dÓ+Ó,×5Ñ5€HÜ×#Ò# HÓ-¨aÑ0Ð0rE   )r   Ú
TokenInfosÚreturnrs   )r@   Ústrrt   zset[TLineNo])r@   ru   rt   r   )rl   ru   rt   rs   )r@   Úbytesrt   ru   )Ú__doc__Ú
__future__r   r1   ri   rY   rS   r:   r   r   Úcollections.abcr   Úcoverager   Úcoverage.typesr   r   r   rs   r+   rD   rg   rR   rr   © rE   r*   Ú<module>r}      sX   ðñ )å "ã 
Û 	Û Û 	Û 
Û Û Ý $å ß 5à�h×(Ñ(Ñ)€
ôCôLô(BôJ.õ	1rE   