Ë
    V.j   ã                  óº   — d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZ ddlmZ ddlmZmZ ee	j"                     Zdd„Zdd„Zdd	„Zdd
„Zdd„Zy)z"Better tokenizing for coverage.py.é    )ÚannotationsN)ÚIterable)Úenv)ÚTLineNoÚTSourceTokenLinesc           	   #  ó¦  K  — d}d}d}| D �]A  \  }}\  }}\  }}	}
||k7  rè|rä|j                  d«      rÓd}|j                  d«      rd}ny|t        j                  k(  r7|j                  d«      r#|j                  d«      j                  |«      rd}n2d}n/t        j
                  j                  r|t        j                  k(  rd}|rBt        |j                  d	«      d
   «      dz
  }t        j                  dd||f||dz   f|«      –— |
}|t        j                  t        j                  fvr|}t        j                  ||||f||	f|
«      –— |}�ŒD y­w)aB  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                úUC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\coverage/phystokens.pyÚ_phys_tokensr+      sg  è ø€ ð !€IØ€KØ€JÜAEÑ=ˆˆu‘o�w ¡¨°¸Ø˜'Ò!Ù˜Y×/Ñ/°Ô7ð  $(Ð Ø×&Ñ& tÔ,Ø',Ñ$ØœeŸl™lÒ*à!×*Ñ*¨6Ô2Ø%×,Ñ,¨WÓ5×>Ñ>¸zÔ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   ‚EEc                ó²  — t        «       }t        j                  t        j                  | «      «      D �]   }t	        |t        j
                  «      rR|j                  |j                  «       |j                  D ]'  }|j                  |j                  j                  «       Œ) Œpt        j                  dk\  r6t	        |t        j                  «      r|j                  |j                  «       Œ¹t        j                  dk\  sŒÍt	        |t        j                  t        j                  f«      sŒø|j                  s�Œ|j                  |j                  «       �Œ# |S )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Ø×Ñ˜tŸ{™{Õ+Ü×Ñ Ó(¬Z¸¼s¿z¹zÌ3Ï>É>Ð>ZÕ-[Ø�|Œ|Ø×"Ñ" 4§;¡;Ö/ð ,ð Ðó    c              #  óR  K  — t         j                  t         j                  t         j                  t        j
                  h}g }d}| j                  d«      j                  dd«      } t        | «      }t        | «      }t        |«      D �]”  \  }}\  }}	\  }
}}
d}t        j                  d|«      D �]c  }|dk(  r|–— g }d}d}�nM|dk(  rd}�nD||v rd}�n<t        j                  j                  rC|t         j                   k(  r0|j                  d	d
«      j                  dd«      }|	t#        |«      z   }|r |	|kD  r|j%                  dd|	|z
  z  f«       d}t        j&                  j)                  |d«      j+                  «       dd }|t         j,                  k(  rdt/        j0                  |«      rd}nLt/        j2                  |«      r7t#        |«      dk(  rd}nt#        |«      dk(  r|d   d   dk(  rd}nd}|r||v rd}|j%                  ||f«       d}d}	�Œf s�Œ“|}�Œ— |r|–— yy­w)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ˆˆu‘m�u˜d¡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°S©jÑ'9Ð :Ô;Ø!&�JÜ$×-Ñ-×1Ñ1°%¸Ó>×DÑDÓFÀrÈÐJ�	ØœEŸJ™JÒ&Ü×(Ñ(¨Ô/à$)™	Ü ×.Ñ.¨uÔ5ä˜t›9¨š>Ø/3Ñ,Ü! $›i¨1šn°$°q±'¸!±*ÀÒ2DØ/3Ñ,à/4Ð,Ù+°¸Ñ0GØ(-˜IØ—‘˜Y¨Ð-Ô.Ø�ØŠDðE ,óF ØŠCðM 6JñP Ø‹
ð ùs   ‚HH'ÈH'c                ój   — t        j                  | «      j                  }t        j                  |«      S )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                óz   — t        | j                  d«      «      j                  }t        j                  |«      d   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   