ó
    àÅŸg…  ã                  óø   • 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J	r	  SSK
Jr  SSKJrJr  SSKJr  SSKJrJrJrJr  SS	KJr  SSS
 jjrSS jrSSS jjr     S             SS jjrSS jrSS jrg)a  Coverage data for coverage.py.

This file had the 4.x JSON data support, which is now gone.  This file still
has storage-agnostic helpers, and is kept to avoid changing too many imports.
CoverageData is now defined in sqldata.py, and imported here to keep the
imports working.

é    )ÚannotationsN)ÚCallable)ÚIterable)ÚCoverageExceptionÚNoDataError)ÚPathAliases)ÚHasherÚfile_be_goneÚhuman_sortedÚplural)ÚCoverageDatac                óÔ   • 0 nU(       a  S nO[         R                  R                  nU R                  5        H,  nU R	                  U5      nUc   e[        U5      X#" U5      '   M.     U$ )a4  Return a dict summarizing the line coverage data.

Keys are based on the file names, and values are the number of executed
lines.  If `fullpath` is true, then the keys are the full pathnames of
the files, otherwise they are the basenames of the files.

Returns a dict mapping file names to counts of lines.

c                ó   • U $ ©N© )Úfs    ÚN/var/www/blue/EV-Temp_rev04/venv/lib/python3.13/site-packages/coverage/data.pyÚ<lambda>Úline_counts.<locals>.<lambda>+   s   € ¡ó    )ÚosÚpathÚbasenameÚmeasured_filesÚlinesÚlen)ÚdataÚfullpathÚsummÚfilename_fnÚfilenamer   s         r   Úline_countsr"      sg   € ð €Dæá!‰ä—g‘g×&Ñ&ˆØ×'Ñ'Ö)ˆØ—
‘
˜8Ó$ˆØÑ Ð Ð Ü&)¨%£jˆˆ[˜Ó"Ó#ñ *ð €Kr   c                ó  • U R                  5       (       a3  UR                  [        U R                  U5      =(       d    / 5      5        OUR                  [	        X5      5        UR                  U R                  U5      5        g)zºContribute `filename`'s data to the `hasher`.

`hasher` is a `coverage.misc.Hasher` instance to be updated with
the file's data.  It should only get the results data, not the run
data.

N)Úhas_arcsÚupdateÚsortedÚarcsÚsorted_linesÚfile_tracer)r   r!   Úhashers      r   Úadd_data_to_hashr+   5   sV   € ð ‡}�}‡�Ø�‰”f˜TŸY™Y xÓ0×6°BÓ7Õ8à�‰”l 4Ó2Ô3Ø
‡M�M�$×"Ñ" 8Ó,Õ-r   c                ó  • [         R                  R                  [         R                  R                  U 5      5      u  p#U=(       d    U/n/ nU GH  n[         R                  R	                  U5      (       a0  UR                  [         R                  R                  U5      5        MX  [         R                  R                  U5      (       a{  [        R                  " [         R                  R                  [         R                  R                  U5      U5      5      S-   nUR                  [        R                  " U5      5        M÷  [        SU S35      e   U Vs/ sH  owR                  S5      (       a  M  UPM     nn[        U5      $ s  snf )z³Make a list of data files to be combined.

`data_file` is a path to a data file.  `data_paths` is a list of files or
directories of files.

Returns a list of absolute file paths.
z.*z)Couldn't combine from non-existent path 'Ú'z-journal)r   r   ÚsplitÚabspathÚisfileÚappendÚisdirÚglobÚescapeÚjoinÚextendr   Úendswithr&   )Ú	data_fileÚ
data_pathsÚdata_dirÚlocalÚfiles_to_combineÚpÚpatternÚfnms           r   Úcombinable_filesr@   D   s  € ô —g‘g—m‘m¤B§G¡G§O¡O°IÓ$>Ó?�O€Hà×) ˜z€JØÐÜˆÜ�7‰7�>‰>˜!×ÑØ×#Ñ#¤B§G¡G§O¡O°AÓ$6Ö7Ü�W‰W�]‰]˜1×ÑÜ—k’k¤"§'¡'§,¡,¬r¯w©w¯©¸qÓ/AÀ5Ó"IÓJÈDÑPˆGØ×#Ñ#¤D§I¢I¨gÓ$6Ö7äÐ IÈ!ÈÈAÐNÓOÐOñ ñ (8ÓXÑ'7 ¿|¹|ÈJ×?WŸÑ'7ÐÐXô
 Ð"Ó#Ð#ùò Ys   ÅF
Å7F
c                óÐ  • [        U R                  5       U5      nU(       a  U(       d  [        S5      eUc  SnO [        R                  " UR
                  5      n[        5       nSn	U GHâ  n
X R                  5       :X  aA  U R                  R                  S5      (       a  U R                  R                  SU
< 35        MX   [        R                  R                  U
5      n[        U
S5       n[         R"                  " SSS9nUR%                  UR'                  5       5        UR)                  5       nXè;  nSSS5        U(       + nW(       a™  U R                  R                  S5      (       a  U R                  R                  S	U
< 35        UR+                  W5         [-        X R                  S
9nUR'                  5         U R%                  UUS9  Sn	U(       a  U" SU 35        OU(       a  U" SU 35        U(       d  GM˜  U R                  R                  S5      (       a  U R                  R                  SU
< 35        [5        U
5        GMå     U(       a  U	(       d  [        S5      egg! [         a    U
n GN™f = f! , (       d  f       GNO= f! [.         aL  nU R0                  (       a  U R1                  [3        U5      5        U(       a  U" SU SU 35        Sn SnANêSnAff = f)a»  Combine a number of data files together.

`data` is a CoverageData.

Treat `data.filename` as a file prefix, and combine the data from all
of the data files starting with that prefix plus a dot.

If `aliases` is provided, it's a `PathAliases` object that is used to
re-map paths to match the local machine's.

If `data_paths` is provided, it is a list of directories or files to
combine.  Directories are searched for files that start with
`data.filename` plus dot as a prefix, and those files are combined.

If `data_paths` is not provided, then the directory portion of
`data.filename` is used as the directory to search for data files.

Unless `keep` is True every data file found and combined is then deleted
from disk. If a file cannot be read, a warning will be issued, and the
file will not be deleted.

If `strict` is true, and no files are found to combine, an error is
raised.

`message` is a function to use for printing messages to the user.

zNo data to combineNFÚdataiozSkipping combining ourself: ÚrbÚsha3_256)ÚusedforsecurityzCombining data file )Údebug)Úmap_pathTzCombined data file zCouldn't combine data file ú: zSkipping duplicate data zDeleting data file zNo usable data files)r@   Úbase_filenamer   Ú	functoolsÚcacheÚmapÚsetÚdata_filenameÚ_debugÚshouldÚwriter   r   ÚrelpathÚ
ValueErrorÚopenÚhashlibÚnewr%   ÚreadÚdigestÚaddr   r   Ú_warnÚstrr
   )r   Úaliasesr9   ÚstrictÚkeepÚmessager<   rG   Úfile_hashesÚcombined_anyr   Úrel_file_nameÚfobjr*   ÚshaÚcombine_this_oneÚdelete_this_oneÚnew_dataÚexcs                      r   Úcombine_parallel_datari   c   sc  € ôF (¨×(:Ñ(:Ó(<¸jÓIÐæÖ&ÜÐ.Ó/Ð/à�Ø‰ä—?’? 7§;¡;Ó/ˆä“%€KØ€LäˆØ×"Ñ"Ó$Ó$ð �{‰{×!Ñ! (×+Ñ+Ø—‘×!Ñ!Ð$@ÀÁÐ"FÔGÙð	ÜŸG™GŸO™O¨AÓ.ˆMô �!�TŒ]˜dÜ—[’[ ¸UÑCˆFØ�M‰M˜$Ÿ)™)›+Ô&Ø—-‘-“/ˆCØ"Ñ5Ð÷	 ð #œ(ˆÞØ�{‰{×!Ñ! (×+Ñ+Ø—‘×!Ñ!Ð$8¸¹Ð">Ô?Ø�O‰O˜CÔ ðCÜ'¨·±Ñ=�Ø—‘”ð —‘˜H¨x�Ñ8Ø#�ÞÙÐ1°-°ÐAÔBøæÙÐ2°=°/ÐBÔCç‰?Ø�{‰{×!Ñ! (×+Ñ+Ø—‘×!Ñ!Ð$7¸±uÐ"=Ô>Ü˜�Oñe öh –lÜÐ0Ó1Ð1ð #€vøôU ó 	ð ‹Mð		ú÷ Ž]ûô %ó (Ø—:—:ð —J‘Jœs 3›xÔ(ÞÙÐ9¸-¸ÈÈ3È%ÐPÔQØ"'•ûð(ús8   ÃI*Ã,A	I=Æ#JÉ*I:É9I:É=
J	Ê
K%ÊAK Ë K%c           	     ó8  • [        U 5      nUR                  5       n [        SU  35        [        R                  R                  U 5      (       d  [        S5        gUR                  5         [        SUR                  5       < 35        [        USS9n[        UR                  5       5      n[        U5      n[        U S[        U5       S35        U HF  nU S	X%    S
[        X%   5       3nUR                  U5      nU(       a	  USU S3-  n[        U5        MH     g)z(Implementation of 'coverage debug data'.zpath: z%No data collected: file doesn't existNz
has_arcs: T)r   z fileÚ:rH   z linez [Ú])r   rN   Úprintr   r   ÚexistsrW   r$   r"   r   Úkeysr   r   r)   )r!   r   ÚsummaryÚ	filenamesÚnfilesr   ÚlineÚplugins           r   Údebug_data_fileru   Ë   sü   € ä˜Ó!€DØ×!Ñ!Ó#€HÜ	ˆF�8�*Ð
ÔÜ�7‰7�>‰>˜(×#Ñ#ÜÐ5Ô6ØØ‡I�I„KÜ	ˆJ�t—}‘}“Ñ)Ð
*Ô+Ü˜$¨Ñ.€GÜ˜WŸ\™\›^Ó,€IÜ�‹^€FÜ	ˆVˆH�Eœ& ›.Ð)¨Ð
+Ô,ÛˆØ��B�w‘z�l %¬¨w©zÓ(:Ð';Ð<ˆØ×!Ñ! !Ó$ˆÞØ�b˜˜ �NÑ"ˆDÜˆdŽò r   c                óL   • U R                  U5      n[        U=(       d    / 5      $ )z+Get the sorted lines for a file, for tests.)r   r&   )r   r!   r   s      r   r(   r(   á   s   € à�J‰J�xÓ €EÜ�%—+˜2ÓÐr   )F)r   r   r   ÚboolÚreturnzdict[str, int])r   r   r!   r[   r*   r	   rx   ÚNoner   )r8   r[   r9   úIterable[str] | Nonerx   z	list[str])NNFFN)r   r   r\   zPathAliases | Noner9   rz   r]   rw   r^   rw   r_   zCallable[[str], None] | Nonerx   ry   )r!   r[   rx   ry   )r   r   r!   r[   rx   z	list[int])Ú__doc__Ú
__future__r   rJ   r3   rU   Úos.pathr   Útypingr   Úcollections.abcr   Úcoverage.exceptionsr   r   Úcoverage.filesr   Úcoverage.miscr	   r
   r   r   Úcoverage.sqldatar   r"   r+   r@   ri   ru   r(   r   r   r   Ú<module>r„      s«   ðñõ #ã Û Û Û å Ý $ç >Ý &ß DÓ DÝ )öô0.ö$ðB #'Ø'+ØØØ,0ðe2Ø
ðe2àðe2ð %ðe2ð ð	e2ð
 ðe2ð *ðe2ð 
õe2ôPõ,r   