Ë
    oPêj×T  ã                  ó  — U 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
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mZmZmZ ddlmZmZmZmZ ddlmZmZ ddlmZm Z   ee
«      Z
g Z!de"d	<   dZ# G d
„ d«      Z$ G d„ de$«      Z% G d„ de%«      Z&d4d„Z'd5d„Z(	 	 	 	 	 	 	 	 d6d„Z)d7d„Z*dgZ+de"d<   g Z,de"d<   ed8d„«       Z-ed9d„«       Z-d:d„Z-d8d„Z.	 	 	 	 d;	 	 	 	 	 	 	 	 	 d<d„Z/d=d>d„Z0d?d@d„Z1dAd„Z2dBd „Z3d!hZ4dCd"„Z5dDd#„Z6dEd$„Z7dFd%„Z8dGd&„Z9 G d'„ d(«      Z: G d)„ d*«      Z; G d+„ d,«      Z< G d-„ d.«      Z=dHdId/„Z>	 	 dJ	 	 	 	 	 	 	 dKd0„Z?dLd1„Z@ e	j‚                  «       ZB e	j‚                  «       ZCd!ZD	 	 	 dM	 	 	 	 	 	 	 dNd2„ZEdOd3„ZFy)Pz'Control of and utilities for debugging.é    )ÚannotationsN)ÚCallableÚIterableÚIteratorÚMapping)ÚIOÚAnyÚFinalÚoverload)Úhuman_sorted_itemsÚisolate_module)ÚAnyCallableÚ	TWritablez	list[str]ÚFORCED_DEBUGc                  ór   — e Zd ZdZdZ	 d
	 	 	 	 	 	 	 dd„Zdd„Zdd„Zej                  dd„«       Z
ddœdd	„Zy)ÚDebugControlz!Control and output for debugging.FNc                ó  — t        |«      t        z   | _        d| _        g }| j	                  d«      rF|j                  t        «       j                  «       |j                  t        «       j                  «       | j	                  d«      r#|j                  t        «       j                  «       | j	                  d«      r|j                  t        «       t        j                  |||¬«      | _        | j                  j                  | _        y)z4Configure the options and output file for debugging.FÚprocessÚpytestÚpid)Ú	file_nameÚfiltersN)Úlistr   ÚoptionsÚsuppress_callersÚshouldÚappendÚ
CwdTrackerÚfilterÚProcessTrackerÚPytestTrackerÚadd_pid_and_tidÚDebugOutputFileÚget_oneÚoutputÚoutfileÚ
raw_output)Úselfr   r%   r   r   s        úS/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/coverage/debug.pyÚ__init__zDebugControl.__init__+   sÁ   € ô ˜G“}¤|Ñ3ˆŒØ %ˆÔàˆØ�;‰;�yÔ!Ø�N‰Nœ:›<×.Ñ.Ô/Ø�N‰Nœ>Ó+×2Ñ2Ô3Ø�;‰;�xÔ Ø�N‰Nœ=›?×1Ñ1Ô2Ø�;‰;�uÔØ�N‰Nœ?Ô+ä%×-Ñ-ØØØð .ó 
ˆŒð
 Ÿ+™+×-Ñ-ˆ�ó    c                ó<   — d| j                   ›d| j                  ›d�S )Nz<DebugControl options=z raw_output=ú>)r   r'   ©r(   s    r)   Ú__repr__zDebugControl.__repr__E   s"   € Ø'¨¯©Ð'7°|ÀDÇOÁOÐCVÐVWÐXÐXr+   c                óB   — |dk(  r| j                   ry|| j                  v S )z@Decide whether to output debug information in category `option`.ÚcallersF)r   r   ©r(   Úoptions     r)   r   zDebugControl.shouldH   s$   € à�YÒ 4×#8Ò#8ØØ˜Ÿ™Ð%Ð%r+   c              #  ób   K  — | j                   }d| _         	 d–— || _         y# || _         w xY w­w)z;A context manager to prevent call stacks from being logged.TN)r   )r(   Úolds     r)   Úwithout_callerszDebugControl.without_callersN   s3   è ø€ ð ×#Ñ#ˆØ $ˆÔð	(Ûà$'ˆDÕ!ø CˆDÕ!üs   ‚/—# ›/£	,¬/©Úexcc          	     ó2  — | j                   j                  |dz   «       |�I| j                   j                  dj                  t        j                  d||j
                  «      «      «       | j                  d«      r[t        j                  «       d   j                  j                  j                  d«      }|�| j                   j                  d|›d�«       | j                  d«      rt        | j                   d¬«       | j                   j                  «        y)	zÑWrite a line of debug output.

        `msg` is the line to write. A newline will be appended.

        If `exc` is provided, a stack trace of the exception will be written
        after the message.

        ú
NÚ r(   é   zself: r1   ©ÚoutÚskip)r%   ÚwriteÚjoinÚ	tracebackÚformat_exceptionÚ__traceback__r   ÚinspectÚstackÚframeÚf_localsÚgetÚdump_stack_framesÚflush)r(   Úmsgr8   Úcaller_selfs       r)   r@   zDebugControl.writeX   sÍ   € ð 	�‰×Ñ˜# ™*Ô%Øˆ?Ø�K‰K×Ñ˜bŸg™g¤i×&@Ñ&@ÀÀsÈC×L]ÑL]Ó&^Ó_Ô`Ø�;‰;�vÔÜ!Ÿ-™-›/¨!Ñ,×2Ñ2×;Ñ;×?Ñ?ÀÓGˆKØÐ&Ø—‘×!Ñ! F¨;¨/¸Ð"<Ô=Ø�;‰;�yÔ!Ü $§+¡+°AÕ6Ø�‰×ÑÕr+   ©N)r   úIterable[str]r%   úIO[str] | Noner   ú
str | NoneÚreturnÚNone)rR   Ústr©r3   rT   rR   Úbool©rR   zIterator[None]©rL   rT   r8   zBaseException | NonerR   rS   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úshow_repr_attrr*   r/   r   Ú
contextlibÚcontextmanagerr6   r@   © r+   r)   r   r   &   sj   „ Ù+à€Nð !%ð	.àð.ð ð.ð ð	.ð
 
ó.ó4Yó&ð ×Ñò(ó ð(ð >Bö r+   r   c                  óT   — e Zd ZdZdd„Zd	d„Zej                  d
d„«       Zddœdd„Z	y)ÚNoDebuggingzBA replacement for DebugControl that will never try to do anything.c                 ó   — y rN   r`   r.   s    r)   r*   zNoDebugging.__init__p   s   € àr+   c                 ó   — y)z'Should we write debug messages?  Never.Fr`   r2   s     r)   r   zNoDebugging.shouldt   s   € àr+   c              #  ó   K  — d–— y­w)z+A dummy context manager to satisfy the api.Nr`   r.   s    r)   r6   zNoDebugging.without_callersx   s   è ø€ ô 	ùs   ‚Nr7   c               ó   — t        d«      ‚)zThis will never be called.z)NoDebugging.write should never be called.)ÚAssertionError©r(   rL   r8   s      r)   r@   zNoDebugging.write}   s   € äÐHÓIÐIr+   ©rR   rS   rU   rW   rX   )
rY   rZ   r[   r\   r*   r   r^   r_   r6   r@   r`   r+   r)   rb   rb   m   s5   „ ÙLóóð ×Ñòó ðð >Bö Jr+   rb   c                  ó   — e Zd ZdZddœdd„Zy)ÚDevNullDebugz)A DebugControl that won't write anywhere.Nr7   c                ó   — y rN   r`   rh   s      r)   r@   zDevNullDebug.write…   s   € Ør+   rX   )rY   rZ   r[   r\   r@   r`   r+   r)   rk   rk   ‚   s   „ Ù3à=Aö r+   rk   c                ó0   — dj                  d| z   dz   «      S )zMake a nice header string.z
--{:-<60s}ú ©Úformat)Úlabels    r)   Úinfo_headerrr   ‰   s   € à×Ñ˜s U™{¨SÑ0Ó1Ð1r+   c              #  óŠ  ‡K  — t        | «      } | sydŠt        ˆfd„| D «       «      sJ ‚| D ]“  \  }}|g k(  rd}|d‰› d�›d�}|xt        d˜ x�#\   t        t	        |«      «      dk  r |› |› �–— ŒE xt        d˜ x�\   n xt         d˜ x�\   n xt
        d˜ x�\   n  n |D ]  }|› |› �–— d	‰d
z   z  }Œ Œ‹	 |› |› �–— Œ• y­w)z¦Produce a sequence of formatted lines from info.

    `info` is a sequence of pairs (label, data).  The produced lines are
    nicely formatted, ready to print.

    Né   c              3  ó@   •K  — | ]  \  }}t        |«      ‰k  –— Œ y ­wrN   ©Úlen)Ú.0rq   Ú_Ú	LABEL_LENs      €r)   ú	<genexpr>z!info_formatter.<locals>.<genexpr>™   s   øè ø€ Ò;©(¨%°Œs�5‹z˜IÕ%Ñ;ùs   ƒz-none-r-   r;   ú: r`   rn   é   )r   ÚallÚtuplerw   rT   Úset)Úinforq   ÚdataÚprefixÚerz   s        @r)   Úinfo_formatterr…   Ž   së   øè ø€ ô �‹:€DÙØØ€IÜÓ;°dÔ;Ô;Ð;Ð;Øò (‰ˆˆtØ�2Š:ØˆDØ˜!˜I˜; `˜Ð' rÐ*ˆØØ”•œC¤ D£	›N¨RÒ/�Ø˜  Ð'Ó'ð à”—˜6œ4Ÿ6 E¤C§EÒ)Øò 3�AØ#˜H Q C˜.Ò(Ø  I°¡MÑ2‘Fñ3ð Ø˜  Ð'Ó'ñ(ùs   ƒC Cc                ó\   —  | t        |«      «       t        |«      D ]  } | d|› �«       Œ y)a,  Write a sequence of (label,data) pairs nicely.

    `write` is a function write(str) that accepts each line of output.
    `header` is a string to start the section.  `info` is a sequence of
    (label, data) pairs, where label is a str, and data can be a single
    value, or a list/set/tuple.

    rn   N)rr   r…   )r@   Úheaderr�   Úlines       r)   Úwrite_formatted_infor‰   ©   s3   € ñ 
Œ+�fÓ
ÔÜ˜tÓ$ò ˆÙ��$�ˆjÕñr+   c                óp   — t        j                  t        | «      | «      }dj                  d„ |D «       «      S )zIGet a one-line summary of an exception, including class name and message.ú|c              3  ó<   K  — | ]  }|j                  «       –— Œ y ­wrN   )Úrstrip)rx   rˆ   s     r)   r{   zexc_one_line.<locals>.<genexpr>¾   s   è ø€ Ò4 d�D—K‘K—MÑ4ùs   ‚)rB   Úformat_exception_onlyÚtyperA   )r8   Úliness     r)   Úexc_one_liner‘   »   s-   € ä×+Ñ+¬D°«I°sÓ;€EØ�8‰8Ñ4¨eÔ4Ó4Ð4r+   )z5.*[/\\]pytest-of-.*[/\\]pytest-\d+([/\\]popen-gw\d+)?ztmp:úlist[tuple[str, str]]Ú_FILENAME_REGEXESÚ_FILENAME_SUBSc                 ó   — y rN   r`   ©Úfilenames    r)   Úshort_filenamer˜   Ç   ó   € àr+   c                 ó   — y rN   r`   r–   s    r)   r˜   r˜   Ì   r™   r+   c                ó¬  — t         s†t        j                  D ]  }t         j                  |df«       Œ ddl}t         j                  t
        j                  j                  |j                  «      df«       t         j                  d„ d¬«       | �Et        D ]  \  }}t        j                  ||| «      } Œ t         D ]  \  }}| j                  ||«      } Œ | S )zIShorten a file name. Directories are replaced by prefixes like 'syspath:'zsyspath:r   Nzcov:c                ó   — t        | d   «      S )Nr   rv   )Úpairs    r)   ú<lambda>z short_filename.<locals>.<lambda>Ù   s   € ¬c°$°q±'«l€ r+   T)ÚkeyÚreverse)r”   ÚsysÚpathr   ÚcoverageÚosÚdirnameÚ__file__Úsortr“   ÚreÚsubÚreplace)r—   Úpathdirr£   Úpatr©   ÚbeforeÚafters          r)   r˜   r˜   Ñ   s½   € åÜ—x‘xò 	9ˆGÜ×!Ñ! 7¨JÐ"7Õ8ð	9ãä×ÑœrŸw™wŸ™¨x×/@Ñ/@ÓAÀ6ÐJÔKÜ×ÑÑ!:ÀTÐÔJØÐÜ)ò 	2‰HˆC�Ü—v‘v˜c 3¨Ó1‰Hð	2ä+ò 	7‰MˆF�EØ×'Ñ'¨°Ó6‰Hð	7à€Or+   c                óø   — 	 t        j                  | «      }t        j                  j                  |j                  «      }|j
                  › d|› �}|S # t        $ r d}Y |S t        $ r}d|› �}Y d}~|S d}~ww xY w)z/A one-line summary of a file, for log messages.z bytes, modified zdoes not existzerror: N)r¤   ÚstatÚdatetimeÚfromtimestampÚst_mtimeÚst_sizeÚFileNotFoundErrorÚ	Exception)r—   ÚsÚmodÚsummaryr„   s        r)   Úfile_summaryrº   â   s…   € ð7Ü�G‰G�HÓˆô ×Ñ×-Ñ-¨a¯j©jÓ9ˆØ—Y‘Y�KÐ0°°Ð6ˆØ€Nøô ò #Ø"‰ð €Nô ò  Ø˜A˜3�-Œð €Nûð ús   ‚A ÁA9Á!A9Á)A4Á4A9c                óŽ  — g d¢}t        j                  «       d| d…   }|s |D ]  }t        j                  |fd„|«      }Œ g }|D ]n  }|j                  d›d�}	|r|	t        |j                  «      d›d�z  }	|j                  }
|rt        |
«      }
|	|
› d	|j                  › �z  }	|j                  |	«       Œp d
j                  |«      S )a^  Return a string summarizing the call stack.

    The string is multi-line, with one line per stack frame. Each line shows
    the function name, the file name, and the line number:

        ...
        start_import_stop : /Users/ned/coverage/trunk/tests/coveragetest.py:95
        import_local_file : /Users/ned/coverage/trunk/tests/coveragetest.py:81
        import_local_file : /Users/ned/coverage/trunk/coverage/backward.py:159
        ...

    `skip` is the number of closest immediate frames to skip, so that debugging
    functions can call this and not be included in the result.

    If `full` is true, then include all frames.  Otherwise, initial "boring"
    frames (ones in site-packages and earlier) are omitted.

    `short_filenames` will shorten filenames using `short_filename`, to reduce
    the amount of repetitive noise in stack traces.

    )z<string>z
\bigor.py$z\bsite-packages\bNéÿÿÿÿc                óB   — t        j                  || j                  «      S rN   )r¨   Úsearchr—   )Úfir¬   s     r)   rž   zshort_stack.<locals>.<lambda>  s   € ¤R§Y¡Y¨s°B·K±KÓ%@€ r+   z>30sz : z#xrn   ú:r:   )rE   rF   Ú	itertoolsÚ	dropwhileÚfunctionÚidrG   r—   r˜   Úlinenor   rA   )r?   ÚfullÚ	frame_idsÚshort_filenamesÚBORING_PRELUDErF   r¬   r�   Ú
frame_inforˆ   r—   s              r)   Úshort_stackrË   ð   sê   € ò:€Nô *1¯©«¸¸$¸r¸Ñ)B€EÙØ!ò 	ˆCÜ×'Ñ'Ø #Ò@Øó‰Eð	ð
 €EØò ˆ
Ø×%Ñ% dÐ+¨3Ð/ˆÙØ”r˜*×*Ñ*Ó+¨BÐ/¨qÐ1Ñ1ˆDØ×&Ñ&ˆÙÜ% hÓ/ˆHØ�8�*˜A˜j×/Ñ/Ð0Ð1Ñ1ˆØ�‰�TÕðð �9‰9�UÓÐr+   c                óF   — | j                  t        |dz   ¬«      dz   «       y)z&Print a summary of the stack to `out`.r<   )r?   r:   N)r@   rË   r=   s     r)   rJ   rJ   (  s   € à‡I�IŒk˜t a™xÔ(¨4Ñ/Õ0r+   c                óZ   — t        j                  «       }||_        |j                  | «      S )z(`repr(text)`, but limited to `numchars`.)ÚreprlibÚReprÚ	maxstringÚrepr)ÚtextÚnumcharsÚrs      r)   Úclipped_reprrÕ   -  s"   € ä�‰‹€AØ€A„KØ�6‰6�$‹<Ðr+   c                óD   — d}t        ddd«      D ]
  }|| |z	  z  }Œ |dz  S )z-Given a 64-bit id, make a shorter 16-bit one.r   é@   é   iÿÿ  )Úrange)Úid64Úid16Úoffsets      r)   Úshort_idrÝ   4  s7   € à€DÜ˜˜2˜rÓ"ò ˆØ�˜‘Ñ‰ðà�&‰=Ðr+   c                ó~   — t        t        j                  «       «      d›}t        j                  «       d›d|› d| › �} | S )z.A filter to add pid and tid to debug messages.Ú04xÚ5dú.r|   )rÝ   Ú_threadÚ	get_identr¤   Úgetpid)rÒ   Útids     r)   r"   r"   <  s@   € ô ”g×'Ñ'Ó)Ó*¨3Ð/€CÜ�i‰i‹k˜"Ð˜Q˜s˜e 2 d VÐ,€DØ€Kr+   z$coverage.object_idc                óÒ   — d„ | j                   j                  «       D «       }dj                  | j                  j                  t        | «      dj                  d„ |D «       «      ¬«      S )z<A function implementing an automatic __repr__ for debugging.c              3  ó~   K  — | ]5  \  }}t        |d d«      r#t        j                  |«      s|t        vr||f–— Œ7 y­w)r]   TN)ÚgetattrrE   ÚismethodÚAUTO_REPR_IGNORE©rx   ÚkÚvs      r)   r{   zauto_repr.<locals>.<genexpr>I  sD   è ø€ ò áˆAˆqÜ�1Ð&¨Ô-Ü× Ñ  Ô#ØÔ%Ñ%ð	 
ˆAŒñùs   ‚;=z<{klass} @{id:#x}{attrs}>r;   c              3  ó2   K  — | ]  \  }}d |› d|›�–— Œ y­w)rn   ú=Nr`   rë   s      r)   r{   zauto_repr.<locals>.<genexpr>S  s    è ø€ Ò;©¨¨1˜˜!˜˜A˜a˜U”mÑ;ùó   ‚)ÚklassrÄ   Úattrs)Ú__dict__Úitemsrp   Ú	__class__rY   rÄ   rA   )r(   Ú
show_attrss     r)   Ú	auto_reprr÷   G  s^   € ñà—M‘M×'Ñ'Ó)ô€Jð '×-Ñ-Ø�n‰n×%Ñ%Üˆd‹8Ø�g‰gÑ;°
Ô;Ó;ð .ó ð r+   c                ó€  — t        | t        «      r-| j                  «       D ��ci c]  \  }}|t        |«      “Œ c}}S t        | t        t
        f«      r t        | «      d„ | D «       «      S t        | d«      r:t        | j                  j                  «       D �� ci c]  \  }} d|z   | “Œ c} }«      S | S c c}}w c c} }w )z>Turn things which are nearly dict/list/etc into dict/list/etc.c              3  ó2   K  — | ]  }t        |«      –— Œ y ­wrN   )Úsimplify)rx   Úvvs     r)   r{   zsimplify.<locals>.<genexpr>\  s   è ø€ Ò0¨”x —|Ñ0ùrð   ró   rá   )	Ú
isinstanceÚdictrô   rú   r   r   r�   Úhasattrró   )rí   rì   rû   s      r)   rú   rú   W  s�   € ä�!”TÔØ-.¯W©W«Y×7¡E A r�”8˜B“<‘Ó7Ð7Ü	�Aœœe�}Ô	%ØŒt�A‹wÑ0¨aÔ0Ó0Ð0Ü	��JÔ	Ü°·
±
×0@Ñ0@Ó0B×C©¨¨1˜˜q™ !™ÓCÓDÐDàˆùó 8ùó Ds   ¤B4ÂB:
c                óH   — t        j                  t        | «      dddd¬«      S )úEDebug helper to pretty-print data, including SimpleNamespace objects.é   TéŒ   )ÚindentÚcompactÚ
sort_dictsÚwidth)ÚpprintÚpformatrú   ©rí   s    r)   Úppformatr
  c  s   € ä�>‰>œ( 1›+¨a¸È$ÐVYÔZÐZr+   c                ó,   — t        t        | «      «       y)r   N)Úprintr
  r	  s    r)   Úppr  h  s   € ä	Œ(�1‹+Õr+   c                ó¶   — |D ]S  }g }| j                  d¬«      D ])  }|j                   ||«      j                  d¬«      «       Œ+ dj                  |«      } ŒU | S )aQ  Run `text` through a series of filters.

    `filters` is a list of functions. Each takes a string and returns a
    string.  Each is run in turn. After each filter, the text is split into
    lines, and each line is passed through the next filter.

    Returns: the final string that results after all of the filters have
    run.

    T)Úkeependsr;   )Ú
splitlinesÚextendrA   )rÒ   r   Ú	filter_fnr�   rˆ   s        r)   Úfilter_textr  m  sf   € ð ò ˆ	ØˆØ—O‘O¨T�OÓ2ò 	DˆDØ�L‰L™ 4›×3Ñ3¸TÐ3ÓBÕCð	Dà�w‰w�u‹~‰ð	ð
 €Kr+   c                  ó    — e Zd ZdZdd„Zdd„Zy)r   z*A class to add cwd info to debug messages.c                ó   — d | _         y rN   )Úcwdr.   s    r)   r*   zCwdTracker.__init__ƒ  s	   € Ø#ˆ�r+   c                ój   — t        j                  «       }|| j                  k7  rd|›d|› �}|| _        |S )z#Add a cwd message for each new cwd.zcwd is now r:   )r¤   Úgetcwdr  )r(   rÒ   r  s      r)   r   zCwdTracker.filter†  s6   € ä�i‰i‹kˆØ�$—(‘(Š?Ø    r¨$¨Ð0ˆDØˆDŒHØˆr+   Nri   ©rÒ   rT   rR   rT   ©rY   rZ   r[   r\   r*   r   r`   r+   r)   r   r   €  s   „ Ù4ó$ôr+   r   c                  ó    — e Zd ZdZdd„Zdd„Zy)r    z)Track process creation for debug logging.c                óD   — t        j                  «       | _        d| _        y )NF)r¤   rä   r   Údid_welcomer.   s    r)   r*   zProcessTracker.__init__’  s   € ÜŸ	™	›ˆŒØ ˆÕr+   c                óJ  — d}t        j                  «       }| j                  |k7  rd| j                  › d|› d�}|| _        nT| j                  sHt	        t
        dd«      }d|›dt
        j                  ›d�d	|›d�z   d
t        j                  «       ›d�z   }|rd| _        ||z   S |S )z1Add a message about how new processes came to be.r;   zNew process: forked z -> r:   ÚargvNzNew process: pid=z, executable: zNew process: cmd: zNew process parent pid: T)r¤   rä   r   r  rè   r¡   Ú
executableÚgetppid)r(   rÒ   Úwelcomer   r  s        r)   r   zProcessTracker.filter–  sµ   € àˆÜ�i‰i‹kˆØ�8‰8�sŠ?Ø,¨T¯X©X¨J°d¸3¸%¸rÐBˆGØˆD�HØ×!Ò!Üœ3 ¨Ó-ˆDà$ ˜v ^´C·N±NÐ3EÀRÐHØ& t h¨bÐ1ñ2à,¬R¯Z©Z«\Ð,<¸BÐ?ñ@ð ñ Ø#ˆDÔØ˜T‘>Ð!àˆKr+   Nri   r  r  r`   r+   r)   r    r    �  s   „ Ù3ó!ôr+   r    c                  ó    — e Zd ZdZdd„Zdd„Zy)r!   z<Track the current pytest test name to add to debug messages.c                ó   — d | _         y rN   )Ú	test_namer.   s    r)   r*   zPytestTracker.__init__¯  s	   € Ø%)ˆ�r+   c                ól   — t        j                  d«      }|| j                  k7  rd|› d|› �}|| _        |S )z+Add a message when the pytest test changes.ÚPYTEST_CURRENT_TESTzPytest context: r:   )r¤   Úgetenvr%  )r(   rÒ   r%  s      r)   r   zPytestTracker.filter²  s;   € ä—I‘IÐ3Ó4ˆ	Ø˜Ÿ™Ò&Ø% i [°°4°&Ð9ˆDØ&ˆDŒNØˆr+   Nri   r  r  r`   r+   r)   r!   r!   ¬  s   „ ÙFó*ôr+   r!   c                  ó²   — e Zd ZU dZ	 	 	 	 dd„Ze	 	 	 	 d	 	 	 	 	 	 	 	 	 dd„«       ZdZded<   dZ	ded	<   edd
„«       Z
edd„«       Zedd„«       Zdd„Zdd„Zy)r#   z9A file-like object that includes pid and cwd information.c                ód   — || _         t        |«      | _        t        j                  «       | _        y rN   )r&   r   r   r¤   rä   r   )r(   r&   r   s      r)   r*   zDebugOutputFile.__init__¾  s#   € ð
 ˆŒÜ˜G“}ˆŒÜ—9‘9“;ˆ�r+   Nc                ó¸  — |�	 | ||«      S | j                  «       \  }}|�|r›|�t        |dd¬«      }not        j                  dt        «      }|dv rt        t        |«      }n@|r.t        |dd¬«      }t        j                  |j                  «       nt        j                  } | ||«      }| j                  ||«       |j                  st        |«      |_        |S )aß  Get a DebugOutputFile.

        If `fileobj` is provided, then a new DebugOutputFile is made with it.

        If `fileobj` isn't provided, then a file is chosen (`file_name` if
        provided, or COVERAGE_DEBUG_FILE, or stderr), and a process-wide
        singleton DebugOutputFile is made.

        `filters` are the text filters to apply to the stream to annotate with
        pids, etc.

        If `interim` is true, then a future `get_one` can replace this one.

        Úazutf-8)ÚencodingÚCOVERAGE_DEBUG_FILE)ÚstdoutÚstderr)Ú_get_singleton_dataÚopenr¤   r(  ÚFORCED_DEBUG_FILErè   r¡   ÚatexitÚregisterÚcloser0  Ú_set_singleton_datar   r   )ÚclsÚfileobjr   r   ÚinterimÚthe_oneÚ
is_interims          r)   r$   zDebugOutputFile.get_oneÇ  sË   € ð, Ðá�w Ó(Ð(à!×5Ñ5Ó7Ñˆ�Øˆ?™jØÐ$Ü˜y¨#¸Ô@‘ô ŸI™IÐ&;Ô=NÓO�	ØÐ 4Ñ4Ü%¤c¨9Ó5‘GÙÜ" 9¨c¸GÔD�GÜ—O‘O G§M¡MÕ2ä!Ÿj™j�GÙ˜' 7Ó+ˆGØ×#Ñ# G¨WÔ5à—’Ü" 7›mˆGŒOØˆr+   z'$coverage.debug.DebugOutputFile.the_onez
Final[str]ÚSYS_MOD_NAMEÚthe_one_and_is_interimÚSINGLETON_ATTRc                ó®   — t        j                  | j                  «      }t        || j                  ||f«       |t
        j                  | j                  <   y)z-Set the one DebugOutputFile to rule them all.N)ÚtypesÚ
ModuleTyper=  Úsetattrr?  r¡   Úmodules)r8  r;  r:  Úsingleton_modules       r)   r7  z#DebugOutputFile._set_singleton_dataþ  sG   € ô !×+Ñ+¨C×,<Ñ,<Ó=ÐÜÐ  #×"4Ñ"4°wÀÐ6HÔIØ(8Œ�‰�C×$Ñ$Ò%r+   c                ó‚   — t         j                  j                  | j                  «      }t	        || j
                  d«      S )zGet the one DebugOutputFile.)NT)r¡   rD  rI   r=  rè   r?  )r8  rE  s     r)   r1  z#DebugOutputFile._get_singleton_data  s3   € ô Ÿ;™;Ÿ?™?¨3×+;Ñ+;Ó<ÐÜÐ'¨×);Ñ);¸\ÓJÐJr+   c                ót   — | j                   t        j                  v rt        j                  | j                   = yy)z6Delete the one DebugOutputFile, just for tests to use.N)r=  r¡   rD  )r8  s    r)   Ú_del_singleton_dataz#DebugOutputFile._del_singleton_data  s-   € ð ×ÑœsŸ{™{Ñ*Ü—‘˜C×,Ñ,Ñ-ð +r+   c                óà   — | j                   €J ‚| j                   j                  sJ| j                   j                  t        || j                  «      «       | j                   j                  «        yy)z9Just like file.write, but filter through all our filters.N)r&   Úclosedr@   r  r   rK   )r(   rÒ   s     r)   r@   zDebugOutputFile.write  sQ   € à�|‰|Ð'Ð'Ð'Ø�|‰|×"Ò"Ø�L‰L×Ñœ{¨4°·±Ó>Ô?Ø�L‰L×ÑÕ ð #r+   c                ó‚   — | j                   €J ‚| j                   j                  s| j                   j                  «        yy)zFlush our file.N)r&   rJ  rK   r.   s    r)   rK   zDebugOutputFile.flush  s4   € à�|‰|Ð'Ð'Ð'Ø�|‰|×"Ò"Ø�L‰L×ÑÕ ð #r+   )r&   rP   r   úIterable[Callable[[str], str]])NNr`   F)
r9  rP   r   rQ   r   rL  r:  rV   rR   r#   )r;  r#   r:  rV   rR   rS   )rR   z#tuple[DebugOutputFile | None, bool]ri   )rÒ   rT   rR   rS   )rY   rZ   r[   r\   r*   Úclassmethodr$   r=  Ú__annotations__r?  r7  r1  rH  r@   rK   r`   r+   r)   r#   r#   »  sÌ   … ÙCðàðð 0óð ð #'Ø $Ø24Øð,àð,ð ð,ð 0ð	,ð
 ð,ð 
ò,ó ð,ðf  I€L�*ÓHØ!9€N�JÓ9àò9ó ð9ð òKó ðKð
 ò.ó ð.ó
!ô!r+   r#   c                óx   — t         j                  d¬«      }|j                  | dz   «       |rt        |d¬«       yy)z.Write a log message as forcefully as possible.T©r:  r:   r<   r=   N)r#   r$   r@   rJ   )rL   rF   r>   s      r)   ÚlogrQ    s7   € ä
×
!Ñ
!¨$Ð
!Ó
/€CØ‡I�Iˆc�D‰jÔÙÜ˜c¨Ö*ð r+   c                ó   ‡ ‡‡— ˆˆ ˆfd„}|S )z2A class decorator to apply a decorator to methods.c                óà   •— t        j                  | t         j                  «      D ]E  \  }}|| j                  vrŒ|dk7  r‰s|j	                  d«      rŒ.|‰v rŒ3t        | | ‰|«      «       ŒG | S )Nr*   ry   )rE   Ú
getmembersÚ	isroutineró   Ú
startswithrC  )r8  ÚnameÚmethÚbutnotÚ	decoratorÚprivates      €€€r)   Ú
_decoratorz$decorate_methods.<locals>._decorator.  sr   ø€ Ü!×,Ñ,¨S´'×2CÑ2CÓDò 	0‰JˆD�$Ø˜3Ÿ<™<Ñ'ØØ�zÒ!Ù 4§?¡?°3Ô#7ØØ�v‰~ØÜ�C˜™y¨›Õ/ð	0ð ˆ
r+   r`   )rZ  rY  r[  r\  s   ``` r)   Údecorate_methodsr]  '  s   ú€ ö
ð Ðr+   c                óD   ‡ — t        j                  ‰ «      dˆ fd„«       }|S )z;A function decorator to stop in the debugger for each call.c                 óZ   •— t         j                  t         _        t        «         ‰| i |¤ŽS rN   )r¡   Ú
__stdout__r/  Ú
breakpoint)ÚargsÚkwargsÚfuncs     €r)   Ú_wrapperz#break_in_debugger.<locals>._wrapper@  s#   ø€ ä—^‘^ŒŒ
ÜŒÙ�TÐ$˜VÑ$Ð$r+   )rb  r	   rc  r	   rR   r	   ©Ú	functoolsÚwraps)rd  re  s   ` r)   Úbreak_in_debuggerri  =  s'   ø€ ô ‡_�_�TÓô%ó ð%ð
 €Or+   c                ó   ‡ ‡‡— dˆ ˆˆfd„}|S )z:A method decorator to debug-log each call to the function.c                óL   •‡ — t        j                  ‰ «      dˆ ˆˆˆfd„«       }|S )Nc                ó  •— t        | t        d «      }|€9t        j                  «       d›dt	        t
        «      d›�}t        | t        |«       d}‰rbdj                  t        t        |«      «      }dj                  d„ |j                  «       D «       «      }|dz  }||z  }|r|r|dz  }||z  }|dz  }‰r1|d	z  }|d
j                  t        d¬«      j                  «       «      z  }t	        t        «      }|› d|d›d‰
j                  › |› d�}t        j!                  d¬«      j#                  |«        ‰
| g|¢­i |¤Ž}	‰r>|› d|d›d‰
j                  › d|	›d�}t        j!                  d¬«      j#                  |«       |	S )NÚ08drn   Ú04dr;   z, c              3  ó:   K  — | ]  } d j                   |Ž –— Œ y­w)z{}={!r}Nro   )rx   Úitems     r)   r{   zCshow_calls.<locals>._decorator.<locals>._wrapper.<locals>.<genexpr>_  s   è ø€ Ò#WÀÐ$4 I×$4Ñ$4°dÔ$;Ñ#Wùs   ‚ú(ú)z @ z; T)rÈ   r:   rP  z return )rè   ÚOBJ_ID_ATTRr¤   rä   ÚnextÚOBJ_IDSrC  rA   ÚmaprÑ   rô   rË   r  ÚCALLSrY   r#   r$   r@   )r(   rb  rc  ÚoidÚextraÚeargsÚekwargsÚcallidrL   Úretrd  Ú	show_argsÚshow_returnÚ
show_stacks             €€€€r)   re  z0show_calls.<locals>._decorator.<locals>._wrapperV  s{  ø€ ä˜$¤¨TÓ2ˆCØˆ{ÜŸ™› SÐ)¨¬4´«=¸Ð*=Ð>�Ü˜œk¨3Ô/ØˆEÙØŸ	™	¤#¤d¨D£/Ó2�ØŸ)™)Ñ#WÈÏÉËÔ#WÓW�Ø˜‘�Ø˜‘�Ù™WØ˜T‘M�EØ˜Ñ �Ø˜‘�ÙØ˜‘�Ø˜Ÿ™¤;¸tÔ#D×#OÑ#OÓ#QÓRÑR�Üœ%“[ˆFØ�E˜˜6 #˜, a¨¯© °u°g¸RÐ@ˆCÜ×#Ñ#¨DÐ#Ó1×7Ñ7¸Ô<Ù�tÐ-˜dÒ- fÑ-ˆCÙØ˜˜Q˜v c˜l¨!¨D¯M©M¨?¸(À3À'ÈÐL�Ü×'Ñ'°Ð'Ó5×;Ñ;¸CÔ@ØˆJr+   )r(   r	   rb  r	   rc  r	   rR   r	   rf  )rd  re  r~  r  r€  s   ` €€€r)   r\  zshow_calls.<locals>._decoratorU  s%   ù€ Ü	�‰˜Ó	÷	ó 
ð	ð6 ˆr+   ©rd  r   rR   r   r`   )r~  r€  r  r\  s   ``` r)   Ú
show_callsr‚  N  s   ú€ ÷ð> Ðr+   c                ój  ‡	— ddh}h d£}h d£}dh}d}g }| j                  «       D ]‚  \  Š	}d}‰	|v rd}nt        ˆ	fd	„|D «       «      rd}|sŒ(t        ˆ	fd
„|D «       «      rt        j                  dd|«      }‰	|v rt	        |«      |kD  r|d|dz
   dz   }|j                  ‰	|f«       Œ„ t        |«      S )aL  Filter environment variables for a debug display.

    Select variables to display (with COV or PY in the name, or HOME, TEMP, or
    TMP), and also cloak sensitive values with asterisks.

    Arguments:
        env: a dict of environment variable names and values.

    Returns:
        A list of pairs (name, value) to show.

    ÚCOVÚPY>   ÚTMPÚHOMEÚTEMP>   ÚAPIÚKEYÚPASSÚTOKENÚSECRETÚ	SIGNATUREÚCOVERAGE_PROCESS_CONFIGé<   FTc              3  ó&   •K  — | ]  }|‰v –— Œ
 y ­wrN   r`   ©rx   ÚslugrW  s     €r)   r{   z/relevant_environment_display.<locals>.<genexpr>�  s   øè ø€ Ò0 $�˜”Ñ0ùó   ƒc              3  ó&   •K  — | ]  }|‰v –— Œ
 y ­wrN   r`   r’  s     €r)   r{   z/relevant_environment_display.<locals>.<genexpr>’  s   øè ø€ Ò2 D�4˜4”<Ñ2ùr”  z\wÚ*Né   z...)rô   Úanyr¨   r©   rw   r   r   )
ÚenvÚSLUGSÚINCLUDEÚCLOAKÚTRUNCATEÚTRUNCATE_LENÚto_showÚvalÚshowrW  s
            @r)   Úrelevant_environment_displayr¢  w  sÒ   ø€ ð �DˆM€EÚ%€GÚB€EØ)Ð*€HØ€Là€GØ—Y‘Y“[ò (‰	ˆˆcØˆØ�7‰?Ø‰DÜÓ0¨%Ô0Ô0ØˆDÚÜÓ2¨EÔ2Ô2Ü—f‘f˜U C¨Ó-�Ø�xÑÜ�s“8˜lÒ*ØÐ0 ¨qÑ 0Ð1°EÑ9�CØ�N‰N˜D #˜;Õ'ð(ô ˜gÓ&Ð&r+   )rq   rT   rR   rT   )r�   úIterable[tuple[str, Any]]rR   rO   )r@   zCallable[[str], None]r‡   rT   r�   r£  rR   rS   )r8   r¶   rR   rT   )r—   rT   rR   rT   )r—   rS   rR   rS   )r—   rQ   rR   rQ   )r   FFF)
r?   ÚintrÆ   rV   rÇ   rV   rÈ   rV   rR   rT   )r   )r>   r   r?   r¤  rR   rS   )é2   )rÒ   rT   rÓ   r¤  rR   rT   )rÚ   r¤  rR   r¤  r  )r(   r	   rR   rT   )rí   r	   rR   r	   )rí   r	   rR   rT   )rí   r	   rR   rS   )rÒ   rT   r   rL  rR   rT   )F)rL   rT   rF   rV   rR   rS   )r`   F)rZ  úCallable[..., Any]rY  rO   r[  rV   rR   r¦  r�  )TFF)r~  rV   r€  rV   r  rV   rR   r¦  )r™  zMapping[str, str]rR   r’   )Gr\   Ú
__future__r   râ   r4  r^   r±   rg  rE   rÁ   r¤   r  r¨   rÎ   r¡   rB   rA  Úcollections.abcr   r   r   r   Útypingr   r	   r
   r   Úcoverage.miscr   r   Úcoverage.typesr   r   r   rN  r3  r   rb   rk   rr   r…   r‰   r‘   r“   r”   r˜   rº   rË   rJ   rÕ   rÝ   r"   rê   r÷   rú   r
  r  r  r   r    r!   r#   rQ  r]  ri  Úcountru  rw  rs  r‚  r¢  r`   r+   r)   ú<module>r­     sW  ðò .å "ã Û Û Û Û Û Û Û 	Û Û 	Û Û 
Û Û ß AÓ Aß +Ó +ç <ß 1á�BÓ€ð €ˆiÓ ØÐ ÷Dñ DôNJ�,ô Jô*�;ô ó2ó
(ð6Ø ðàðð $ðð 
ó	ó$5ð Gð,Ð Ð(ó ð )+€Ð%Ó *ð 
ò	ó 
ð	ð 
ò	ó 
ð	óó"ð ØØØ!ð	5Ø
ð5à
ð5ð ð5ð ð	5ð
 	ó5ôp1ô
óóð *Ð*Ð óó 	ó[ó
ó
÷&ñ ÷ñ ÷:ñ ÷a!ñ a!ôH+ð ØðØ!ðàðð ðð ó	ó,	ð ˆ)�/‰/Ó
€Øˆ	�‰Ó€Ø#€ð ØØð&Øð&àð&ð ð&ð ó	&ôR!'r+   