§
    0›j•c  ã                  óê  — 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mZ ddlmZ ddlmZmZ ddlmZmZmZ ddlmZ dd	lmZmZ dd
lmZmZmZ ddl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& ddl'm(Z(m)Z) ddl*m+Z+m,Z, ddl-m.Z.m/Z/m0Z0m1Z1 erddl2m3Z3 ddl4m5Z5  e(e¦  «        Zd5d6d„Z6d7d„Z7d8d „Z8d8d!„Z9d9d$„Z:d:d*„Z;d;d+„Z<d;d,„Z=d;d-„Z>e G d.„ d/¦  «        ¦   «         Z?d<d1„Z@d=d2„ZA G d3„ d4¦  «        ZBdS )>z=Determining whether files are being measured/reported or not.é    )ÚannotationsN)ÚIterable)Ú	dataclass)Ú	FrameTypeÚ
ModuleType)ÚTYPE_CHECKINGÚAnyÚcast)Úenv)ÚFileDispositionÚdisposition_init)ÚConfigErrorÚCoverageExceptionÚPluginError)ÚGlobMatcherÚModuleMatcherÚTreeMatcherÚcanonical_filenameÚfind_python_filesÚprep_patterns)Úisolate_moduleÚsys_modules_saved)Úsource_for_fileÚsource_for_morf)Ú	TDebugCtlÚTFileDispositionÚTMorfÚTWarnFn)ÚCoverageConfig)ÚPluginsFÚmorfr   Ú	directoryÚboolÚreturnÚstrc                ó¶   — t          t          | ¦  «        ¦  «        }|                     d¦  «        s|r%t          j                             |¦  «        d         }|S )zôReturn the canonical path of the module or file `morf`.

    If the module is a package, then return its directory. If it is a
    module, then return its file, unless `directory` is True, in which
    case return its enclosing directory.

    z__init__.pyr   )r   r   ÚendswithÚosÚpathÚsplit)r!   r"   Ú	morf_paths      úO/home/lighthouse/health/venv/lib64/python3.11/site-packages/coverage/inorout.pyÚcanonical_pathr-   ,   sT   € õ #¥?°4Ñ#8Ô#8Ñ9Ô9€IØ×Ò˜-Ñ(Ô(ð 0¨Ið 0Ý”G—M’M )Ñ,Ô,¨QÔ/ˆ	ØÐó    ÚfilenameÚframeúFrameType | Noneú
str | Nonec                ó*  — |�|j         ni }|                     dd¦  «        }t          |t          ¦  «        r|dk    r|S |                     dd¦  «        }|r$|j        }t          |t          ¦  «        r|dk    r|S t          j        | ¦  «        }|�|S |S )a¥  Get the name of the module for a filename and frame.

    For configurability's sake, we allow __main__ modules to be matched by
    their importable name.

    If loaded via runpy (aka -m), we can usually recover the "original"
    full dotted module name, otherwise, we resort to interpreting the
    file name to get the module's name.  In the case that the module name
    can't be determined, None is returned.

    NÚ__name__Ú__main__Ú__spec__)Ú	f_globalsÚgetÚ
isinstancer%   ÚnameÚinspectÚgetmodulename)r/   r0   Úmodule_globalsÚdunder_nameÚspecÚfullnameÚinspectednames          r,   Úname_for_modulerB   :   s´   € ð ).Ð(9�U”_�_¸r€NØ,×0Ò0°¸TÑBÔB€Kå�+�sÑ#Ô#ð ¨°zÒ(AÐ(AàÐà×Ò˜j¨$Ñ/Ô/€DØð Ø”9ˆÝ�h¥Ñ$Ô$ð 	¨°ZÒ)?Ð)?àˆOõ Ô)¨(Ñ3Ô3€MØÐ ØÐàÐr.   Úmodr   c                óH   — t          | d¦  «        ot          | dd¦  «        du S )z5Is the module object `mod` a PEP420 namespace module?Ú__path__Ú__file__N)ÚhasattrÚgetattr)rC   s    r,   Úmodule_is_namespacerI   \   s(   € å�3˜
Ñ#Ô#ÐN­°°ZÀÑ(FÔ(FÈ$Ð(NÐNr.   c                ój   — t          | dd¦  «        }|€dS t          j                             |¦  «        S )z8Does the module object `mod` have an existing __file__ ?rF   NF)rH   r(   r)   Úexists)rC   Úmod__file__s     r,   Úmodule_has_filerM   a   s2   € å˜#˜z¨4Ñ0Ô0€KØÐØˆuÝŒ7�>Š>˜+Ñ&Ô&Ð&r.   Ú
modulenameútuple[str | None, list[str]]c                ó²   — d}g }	 t           j                             | ¦  «        }|�|j        }t	          |j        pd¦  «        }n# t          $ r Y nw xY w||fS )zÆFind the file and search path for `modulename`.

    Returns:
        filename: The filename of the module, or None.
        path: A list (possibly empty) of directories to find submodules in.

    N© )Ú	importlibÚutilÚ	find_specÚoriginÚlistÚsubmodule_search_locationsÚ	Exception)rN   r/   r)   r?   s       r,   Úfile_and_path_for_modulerY   i   s{   € ð €HØ€Dð?ÝŒ~×'Ò'¨
Ñ3Ô3ˆð ÐØ”{ˆHÝ˜Ô7Ð=¸2Ñ>Ô>ˆDøøõ ð ð ð Øˆðøøøð �Tˆ>Ðs   †A Á
AÁAÚpathsúset[str]Ú
path_namesú	list[str]ÚNonec                óÀ   — t          t          j        ¦   «         ¦  «        }|D ]:}t          j        |¦  «        }|D ]!}||v r|                      ||         ¦  «         Œ"Œ;dS )z$Get paths from `sysconfig.get_paths`N)ÚsetÚ	sysconfigÚget_scheme_namesÚ	get_pathsÚadd)rZ   r\   Úscheme_namesÚschemeÚconfig_pathsÚ	path_names         r,   Ú_add_sysconfig_pathsri   ~   sx   € å•yÔ1Ñ3Ô3Ñ4Ô4€Làð 3ð 3ˆÝ Ô*¨6Ñ2Ô2ˆØ#ð 	3ð 	3ˆIØ˜LÐ(Ð(Ø—	’	˜, yÔ1Ñ2Ô2Ð2øð	3ð3ð 3r.   c                ó*   — t          | ddg¦  «         dS )z;Add paths where the stdlib can be found to the set `paths`.ÚstdlibÚ
platstdlibN)ri   )rZ   s    r,   Ú_add_stdlib_pathsrm   ‰   s   € å˜ ¨<Ð 8Ñ9Ô9Ð9Ð9Ð9r.   c                ó¬   — t          | g d¢¦  «         t          j        D ]4}t          |¦  «        }|j        r|j        �|                      |¦  «         Œ5dS )z:Add locations for third-party packages to the set `paths`.)ÚplatlibÚpurelibÚscriptsN)ri   Úsysr)   Ú_analyze_directoryrK   Úvenvrd   )rZ   ÚdÚdetails      r,   Ú_add_third_party_pathsrw   Ž   sf   € õ ˜Ð AÐ AÐ AÑBÔBÐBõ ŒXð ð ˆÝ# AÑ&Ô&ˆØŒ=ð 	˜Vœ[Ð4Ø�IŠI�a‰LŒLˆLøðð r.   c                óÞ   — t          t          d¬¦  «        }|                      |¦  «         t          j        r5|                      t
          j                             |d¦  «        ¦  «         dS dS )zAAdd paths where coverage.py code can be found to the set `paths`.T)r"   ÚtestsN)r-   rF   rd   r   ÚTESTINGr(   r)   Újoin)rZ   Ú
cover_paths     r,   Ú_add_coverage_pathsr}   ›   sb   € å¥°DÐ9Ñ9Ô9€JØ	‡I‚IˆjÑÔÐÝ
„{ð 5à�	Š	•"”'—,’,˜z¨7Ñ3Ô3Ñ4Ô4Ð4Ð4Ð4ð5ð 5r.   c                  ó(   — e Zd ZU dZded<   ded<   dS )ÚDirectoryDetailzDetails about a directory.r#   rK   r2   rt   N)r4   Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__rQ   r.   r,   r   r   ¤   s-   € € € € € € à$Ð$à€L€L�LØÐÐÑÐÐr.   r   ru   c                óˆ  — t          t          j                             | ¦  «        d¬¦  «        }|j        rŒ	 t          j                             | ¦  «        } | t          j                             | ¦  «        k    rnHt          j                             | d¦  «        }t          j                             |¦  «        r| |_        nŒ‹|S )z8Analyze the directory `d` for existence and venv status.N)rK   rt   Tz
pyvenv.cfg)r   r(   r)   rK   Údirnamer{   rt   )ru   rv   Úpyvenvs      r,   rs   rs   ¬   s¡   € å¥B¤G§N¢N°1Ñ$5Ô$5¸DÐAÑAÔA€FØ„}ð ð	Ý”—’ Ñ"Ô"ˆAØ•B”G—O’O AÑ&Ô&Ò&Ð&ØÝ”W—\’\ ! \Ñ2Ô2ˆFÝŒw�~Š~˜fÑ%Ô%ð Ø�”Øð	ð €Mr.   c                ól   — t          | ¦  «        }|j        sd}n|j        �d|j        › �}nd}| ›d|› d�S )z8Get a string describing the directory `d` for debugging.zdoes not existNzvenv at z
not a venvz (ú))rs   rK   rt   )ru   rv   Údescribes      r,   Ú_dir_detailrŠ   »   sU   € å Ñ"Ô"€FØŒ=ð  Ø#ˆˆØ	ŒÐ	 Ø+˜fœkÐ+Ð+ˆˆàˆØÐ Ð �XÐ Ð Ð Ð r.   c                  ó|   — e Zd ZdZd&d„Zd'd„Zd(d„Zd)d*d„Zd+d„Zd(d„Z	d(d„Z
d(d„Zd,d„Zd-d„Zd.d"„Zd/d#„Zd0d%„ZdS )1ÚInOrOutz0Machinery for determining what files to measure.Úconfigr   Úwarnr   ÚdebugúTDebugCtl | NoneÚinclude_namespace_packagesr#   r$   r^   c           
     óª  — || _         || _        || _        |  t          | _        t          |j        ¦  «        | _        t          |j        ¦  «        | _        |j        pg D ]V}t          j
                             |¦  «        r| j                             |¦  «         Œ<| j                             |¦  «         ŒWt          | j        ¦  «        D ]M\  }}t          j
                             |¦  «        st          d|›�¦  «        ‚t          |¦  «        | j        |<   ŒN| j        d d …         | _        t#          |j        ¦  «        | _        t#          |j        ¦  «        | _        t-          ¦   «         | _        |j        st3          | j        ¦  «         t-          ¦   «         | _        t7          | j        ¦  «         t-          ¦   «         | _        t;          | j        ¦  «         | j        r¥|                      d¦  «         t?          tA          j!        ¦   «         ¦  «        D ]o}|                      d|› d�¦  «         tA          j"        |¦  «         #                    ¦   «         D ]-\  }}	|                      d|› dtI          |	¦  «        › �¦  «         Œ.Œpd | _%        d | _&        d | _'        d | _(        d | _)        | j        s| j        rQ| j        r!tU          | j        dd| j        ¦  «        | _%        | j        r!tW          | j        d	d
| j        ¦  «        | _&        n(| j        r!tU          | j        dd| j        ¦  «        | _'        | j        r!tY          | j        dd| j        ¦  «        | _(        | j        r!tY          | j        dd| j        ¦  «        | _)        tU          | j        dd| j        ¦  «        | _-        t          t\          j
        ¦  «        | _/        |  0                    ¦   «          d S )NzSource dir is not a directory: zsysconfig paths:z    ú:z        ú: ÚsourcezSource directoryÚsource_pkgszSource importsÚpylibzPython stdlibÚincludeÚIncludeÚomitÚOmitÚcoveragezCoverage code)1rŽ   r�   r‘   r   Ú
disp_classrV   r–   Úsource_dirsr•   r(   r)   ÚisdirÚappendÚ	enumerater   r   Úsource_pkgs_unmatchedr   Úrun_includer˜   Úrun_omitrš   r`   Úpylib_pathsÚcover_pylibrm   Úcover_pathsr}   Úthird_pathsrw   Ú_debugÚsortedra   rb   rc   ÚitemsrŠ   Úsource_matchÚsource_pkgs_matchÚpylib_matchÚinclude_matchÚ
omit_matchr   r   r   Úcoverage_matchrr   Úlast_sys_pathÚ!set_matchers_depending_on_syspath)
Úselfr�   rŽ   r�   r‘   ÚsrcÚirf   ÚkÚvs
             r,   Ú__init__zInOrOut.__init__Ê   sÍ  € ð ˆŒ	ØˆŒ
Ø*DˆÔ'àÐÝ2AˆŒå&*¨6Ô+=Ñ&>Ô&>ˆÔÝ&*¨6Ô+=Ñ&>Ô&>ˆÔØ”=Ð& Bð 	-ð 	-ˆCÝŒw�}Š}˜SÑ!Ô!ð -ØÔ ×'Ò'¨Ñ,Ô,Ð,Ð,àÔ ×'Ò'¨Ñ,Ô,Ð,Ð,õ   Ô 0Ñ1Ô1ð 	:ð 	:‰FˆAˆsÝ”7—=’= Ñ%Ô%ð MÝ!Ð"KÀCÐ"KÐ"KÑLÔLÐLÝ"4°SÑ"9Ô"9ˆDÔ˜QÑÐà%)Ô%5°a°a°aÔ%8ˆÔ"å$ VÔ%7Ñ8Ô8ˆŒÝ! &¤/Ñ2Ô2ˆŒ	õ &)¡U¤UˆÔØÔ!ð 	0Ý˜dÔ.Ñ/Ô/Ð/õ &)¡U¤UˆÔÝ˜DÔ,Ñ-Ô-Ð-õ &)¡U¤UˆÔÝ˜tÔ/Ñ0Ô0Ð0ð Œ:ð 	BØ�KŠKÐ*Ñ+Ô+Ð+Ý ¥Ô!;Ñ!=Ô!=Ñ>Ô>ð Bð B�Ø—’Ð, 6Ð,Ð,Ð,Ñ-Ô-Ð-Ý%Ô/°Ñ7Ô7×=Ò=Ñ?Ô?ð Bð B‘D�A�qØ—K’KÐ @¨1Ð @Ð @µ¸A±´Ð @Ð @ÑAÔAÐAÐAðBð !ˆÔØ!%ˆÔØˆÔØ!ˆÔØˆŒàÔð 	˜tÔ/ð 	ØÔð Ý$/ØÔ$ hÐ0BÀDÄKñ%ô %�Ô!ð Ôð Ý)6ØÔ$ mÐ5EÀtÄ{ñ*ô *�Ô&øð Ôð Ý#.ØÔ$ g¨ÀÄñ$ô $�Ô ð Œ<ð 	^Ý!,¨T¬\¸9ÀiÐQUÔQ\Ñ!]Ô!]ˆDÔØŒ9ð 	RÝ)¨$¬)°V¸VÀTÄ[ÑQÔQˆDŒOå)ØÔ˜j¨/¸4¼;ñ
ô 
ˆÔõ "¥#¤(™^œ^ˆÔØ×.Ò.Ñ0Ô0Ð0Ð0Ð0r.   Úmsgr%   c                óL   — | j         r| j                              |¦  «         dS dS )z.A more convenient way to write debug messages.N)r�   Úwrite)r´   rº   s     r,   r©   zInOrOut._debug#  s2   € àŒ:ð 	"ØŒJ×Ò˜SÑ!Ô!Ð!Ð!Ð!ð	"ð 	"r.   c           	     óÐ  — |                       dd                     d„ t          j        D ¦   «         ¦  «        z   ¦  «         t	          ¦   «         | _        t          | j        ¦  «         t          | j        dd| j         ¦  «        | _        t	          ¦   «         | _	        t          ¦   «         5  | j        D �]$}	 t          |¦  «        \  }}|                       d|›d|›�¦  «         n2# t          $ r%}|                       d|›d	|› �¦  «         Y d
}~Œ\d
}~ww xY w|rj| j                             |¦  «        rO|                       d|›d|›�¦  «         | j	                             t!          t#          |¦  «        ¦  «        ¦  «         ŒÐ|D ]Q}| j                             |¦  «        r5|                       d|›d|›�¦  «         | j	                             |¦  «         ŒR�Œ&	 d
d
d
¦  «         n# 1 swxY w Y   | j        D ]N}| j                             |¦  «        r2|                       d|›�¦  «         | j	                             |¦  «         ŒOt          | j	        dd| j         ¦  «        | _        d
S )zÍSet up matchers that depend on sys.path.

        This is called at initialization time, and later if sys.path changes,
        which can happen when test runners like pytest manipulate sys.path.

        z	sys.path:Ú c              3  ó:   K  — | ]}d t          |¦  «        › �V — ŒdS )z
    N)rŠ   )Ú.0ru   s     r,   ú	<genexpr>z<InOrOut.set_matchers_depending_on_syspath.<locals>.<genexpr>/  s1   è è € Ð)VÐ)VÈÐ*Cµ;¸q±>´>Ð*CÐ*CÐ)VÐ)VÐ)VÐ)VÐ)VÐ)Vr.   ÚthirdzThird-party libzImported source package z as zCouldn't import source package r”   Nz"Source in third-party: source_pkg z at zSource in third-party: z path directory at z(Source in third-party: source directory Úsource_in_thirdzSource in third-party)r©   r{   rr   r)   r`   r¨   rw   r   Úthird_matchÚsource_in_third_pathsr   r–   rY   r   Úmatchrd   r-   r   rž   Úsource_in_third_match)r´   ÚpkgÚmodfiler)   ÚexcÚpathdirrµ   s          r,   r³   z)InOrOut.set_matchers_depending_on_syspath(  s  € ð 	�Š�K "§'¢'Ð)VÐ)VÍSÌXÐ)VÑ)VÔ)VÑ"VÔ"VÑVÑWÔWÐWå™5œ5ˆÔÝ˜tÔ/Ñ0Ô0Ð0Ý& tÔ'7¸ÐBSÐUYÔU`ÑaÔaˆÔõ
 &)¡U¤UˆÔ"ÝÑ Ô ð 	Dð 	DØÔ'ð Dñ D�ðÝ$<¸SÑ$AÔ$A‘M�G˜TØ—K’KÐ Q¸3Ð QÐ QÀgÐ QÐ QÑRÔRÐRÐRøÝ(ð ð ð Ø—K’KÐ PÀ#Ð PÐ PÈ3Ð PÐ PÑQÔQÐQØ�H�H�H�Høøøøðøøøð ð DØÔ'×-Ò-¨gÑ6Ô6ð aØŸšØWÀÐWÐWÈGÐWÐWñô ð ð Ô2×6Ò6µ~ÅoÐV]ÑF^ÔF^Ñ7_Ô7_Ñ`Ô`Ð`øà#'ð Dð D˜ØÔ+×1Ò1°'Ñ:Ô:ð DØ ŸKšKØ _¸#Ð _Ð _ÐT[Ð _Ð _ñô ð ð !Ô6×:Ò:¸7ÑCÔCÐCøñDðDð	Dð 	Dð 	Dñ 	Dô 	Dð 	Dð 	Dð 	Dð 	Dð 	Dð 	Døøøð 	Dð 	Dð 	Dð 	Dð, Ô#ð 	4ð 	4ˆCØÔ×%Ò% cÑ*Ô*ð 4Ø—’ÐNÀsÐNÐNÑOÔOÐOØÔ*×.Ò.¨sÑ3Ô3Ð3øÝ%0ØÔ&Ð(9Ð;RÐTXÔT_ñ&
ô &
ˆÔ"Ð"Ð"s=   Â)G$Â5-C#Ã"G$Ã#
DÃ-DÄG$ÄDÄCG$Ç$G(Ç+G(Nr/   r0   r1   r   c                ó|  — t           j        | j        k    r2|                      ¦   «          t	          t           j        ¦  «        | _        |}t          | j        |¦  «        }dd„}|                     d¦  «        r ||d¦  «        S |�š|j        o|j         	                    d
¦  «        }|rwt          t          |¦  «        ¦  «        }|rY|                     d¦  «        sDt          j                             |¦  «        }|t          j                             |¦  «        k    r|}|s ||d¦  «        S |                     d¦  «        r ||d¦  «        S |                     d¦  «        r ||d¦  «        S t          |¦  «        }||_        d	}	| j        j        D ]Ç}	|	j        sŒ
	 |	                     |¦  «        }
|
�Y|	|
_        d|_        |
|_        |
                     ¦   «         rd|_        n&t          |
                     ¦   «         ¦  «        |_         n[Œ|# t0          $ r? |	j        }t5          j        ¦   «         }|                      d|›d|› �¦  «         d|	_        Y ŒÄw xY wd|_        ||_        |j        sK|j        st;          d|	›d|j        › d�¦  «        ‚|                      |j        |¦  «        }|r |||¦  «         |S )a  Decide whether to trace execution in `filename`, with a reason.

        This function is called from the trace function.  As each new file name
        is encountered, this function determines whether it is traced or not.

        Returns a FileDisposition object.

        Údispr   Úreasonr%   r$   c                ó"   — d| _         || _        | S )z+Simple helper to make it easy to return NO.F)ÚtracerÎ   )rÍ   rÎ   s     r,   Únopez"InOrOut.should_trace.<locals>.nopeg  s   € àˆDŒJØ ˆDŒKØˆKr.   ú<zoriginal file name is not realNrF   zempty string isn't a file namezmemory:zmemory isn't traceablezfile name is not realTzDisabling plug-in z due to an exception:
FzPlugin z! didn't set source_filename for 'ú')rÍ   r   rÎ   r%   r$   r   ) rr   r)   r²   r³   rV   r   r�   Ú
startswithr7   r8   r   r%   r(   Úbasenamer   ÚpluginsÚfile_tracersÚ_coverage_enabledÚfile_tracerÚ_coverage_pluginrÐ   Úhas_dynamic_source_filenameÚhas_dynamic_filenameÚsource_filenamerX   Ú_coverage_plugin_nameÚ	tracebackÚ
format_excrŽ   r   Úoriginal_filenameÚcheck_include_omit_etc)r´   r/   r0   rá   rÍ   rÑ   Údunder_fileÚorigÚ	canonicalÚpluginrÙ   Úplugin_nameÚtbrÎ   s                 r,   Úshould_tracezInOrOut.should_traceW  sB  € õ Œ8�tÔ)Ò)Ð)Ø×2Ò2Ñ4Ô4Ð4Ý!%¥c¤h¡¤ˆDÔà$ÐÝ ¤°Ñ:Ô:ˆð	ð 	ð 	ð 	ð ×'Ò'¨Ñ,Ô,ð 	@Ø�4˜Ð>Ñ?Ô?Ð?àÐð  œ/ÐM¨e¬o×.AÒ.AÀ*Ñ.MÔ.MˆKØð 	5å*­3¨{Ñ+;Ô+;Ñ<Ô<�Ø$ð 5Ð->×-IÒ-IÈ#Ñ-NÔ-Nð 5Ýœ7×+Ò+Ð,=Ñ>Ô>�DØ�rœw×/Ò/°Ñ9Ô9Ò9Ð9ð $5˜àð 	@à�4˜Ð>Ñ?Ô?Ð?à×Ò˜yÑ)Ô)ð 	8Ø�4˜Ð6Ñ7Ô7Ð7à×Ò˜sÑ#Ô#ð 	7ð
 �4˜Ð5Ñ6Ô6Ð6å& xÑ0Ô0ˆ	Ø"+ˆÔð ˆØ”lÔ/ð 	-ð 	-ˆFØÔ+ð ØðØ$×0Ò0°Ñ;Ô;�ØÐ*Ø39�KÔ0Ø!%�D”JØ'2�DÔ$Ø"×>Ò>Ñ@Ô@ð Ø48˜Ô1Ð1å/AØ'×7Ò7Ñ9Ô9ñ0ô 0˜Ô,ð �Eð +øõ ð ð ð Ø$Ô:�ÝÔ)Ñ+Ô+�Ø—	’	ÐY¨{ÐYÐYÐUWÐYÐYÑZÔZÐZØ+0�Ô(Ø�ðøøøð ˆDŒJØ#,ˆDÔ àÔ(ð 	#ØÔ'ð Ý!Øb˜fÐbÐbÈÔI_ÐbÐbÐbñô ð ð ×0Ò0°Ô1EÀuÑMÔMˆFØð #Ø��T˜6Ñ"Ô"Ð"àˆs   ÆA.HÈAIÉIr2   c                óh  — t          ||¦  «        }| j        s| j        rÉd}d}| j        r[t          |t          ¦  «        r@| j                             |¦  «        r&d}|| j        v r| j                             |¦  «         nd|›d�}|s#| j        r| j                             |¦  «        rd}|s|dz   S | j                             |¦  «        r| j	                             |¦  «        sdS n| j
        r| j
                             |¦  «        sdS n[| j                             |¦  «        rd	S | j                             |¦  «        rd
S | j        r| j                             |¦  «        rdS | j        r| j                             |¦  «        rdS 	 |                     d¦  «         n# t          $ r Y dS w xY wdS )zÊCheck a file name against the include, omit, etc, rules.

        Returns a string or None.  String means, don't trace, and is the reason
        why.  None means no reason found to not trace.

        r¾   FTzmodule ú zfalls outside the --source specz#inside --source, but is third-partyz!falls outside the --include treeszis part of coverage.pyzis a third-party modulezis in the stdlibzis inside an --omit patternzutf-8znon-encodable filenameN)rB   r¬   r­   r9   r%   rÆ   r¢   ÚremoverÄ   rÇ   r¯   r±   r®   r°   ÚencodeÚUnicodeEncodeError)r´   r/   r0   rN   ÚextraÚoks         r,   râ   zInOrOut.check_include_omit_etc½  s-  € õ % X¨uÑ5Ô5ˆ
ð Ôð $	* Ô 6ð $	*ØˆEØˆBØÔ%ð 6Ý˜j­#Ñ.Ô.ð 6°4Ô3I×3OÒ3OÐPZÑ3[Ô3[ð 6Ø�BØ! TÔ%?Ð?Ð?ØÔ2×9Ò9¸*ÑEÔEÐEøà5 jÐ5Ð5Ð5�EØð ˜$Ô+ð ØÔ$×*Ò*¨8Ñ4Ô4ð Ø�BØð AØÐ@Ñ@Ð@ØÔ×%Ò% hÑ/Ô/ð =¸Ô8R×8XÒ8XÐYaÑ8bÔ8bð =Ø<Ð<øØÔð 	*ØÔ%×+Ò+¨HÑ5Ô5ð ;Ø:Ð:ð;ð
 Ô"×(Ò(¨Ñ2Ô2ð 0Ø/Ð/ð Ô×%Ò% hÑ/Ô/ð 1Ø0Ð0ð Ôð * DÔ$4×$:Ò$:¸8Ñ$DÔ$Dð *Ø)Ð)ð Œ?ð 	1˜tœ×4Ò4°XÑ>Ô>ð 	1Ø0Ð0ð	,Ø�OŠO˜GÑ$Ô$Ð$Ð$øÝ!ð 	,ð 	,ð 	,Ø+Ð+Ð+ð	,øøøð ˆts   ÆF! Æ!
F/Æ.F/c                óf   — | j         r'| j        s| j        r|                      dd¬¦  «         dS dS dS )z)Warn if there are settings that conflict.z,--include is ignored because --source is setzinclude-ignored©ÚslugN)r˜   rž   r–   rŽ   )r´   s    r,   Úwarn_conflicting_settingsz!InOrOut.warn_conflicting_settingsý  sZ   € àŒ<ð 	bØÔð b 4Ô#3ð bØ—	’	ÐHÐO`�	ÑaÔaÐaÐaÐað	bð 	bðbð br.   c                ó„  — | j         s| j        s| j        �r't          ¦   «         }t	          t
          j                             ¦   «         ¦  «        D ]ï}t          |dd¦  «        }|€Œ||v rŒt          t          |dd¦  «        ¦  «        dk    rŒ>|  
                    |¦  «        }|j        rŒ[|j        r2d|› �}|                      |d¬¦  «         |                     |¦  «         Œ”| j        rR| j                             d	¦  «        r8| j                             d
                     |j        |j        ¦  «        ¦  «         ŒîdS dS )zCWarn if files have already been imported that we will be measuring.rF   NrE   rQ   é   z/Already imported a file that will be measured: zalready-importedrò   rÐ   z+Didn't trace already imported file {!r}: {})r˜   rž   r–   r`   rV   rr   ÚmodulesÚvaluesrH   Úlenré   rÜ   rÐ   rŽ   rd   r�   Úshouldr¼   Úformatrá   rÎ   )r´   ÚwarnedrC   r/   rÍ   rº   s         r,   Úwarn_already_imported_filesz#InOrOut.warn_already_imported_files  sl  € àŒ<ð 	˜4Ô+ð 	¨tÔ/?ñ 	Ý‘U”UˆFÝ�CœK×.Ò.Ñ0Ô0Ñ1Ô1ð ð �Ý" 3¨
°DÑ9Ô9�ØÐ#ØØ˜vÐ%Ð%Øå•w˜s J°Ñ3Ô3Ñ4Ô4°qÒ8Ð8àà×(Ò(¨Ñ2Ô2�ØÔ,ð ð Ø”:ð 
ØVÈHÐVÐV�CØ—I’I˜cÐ(:�IÑ;Ô;Ð;Ø—J’J˜xÑ(Ô(Ð(Ð(Ø”Zð  D¤J×$5Ò$5°gÑ$>Ô$>ð Ø”J×$Ò$ØE×LÒLØ Ô2Ø œKñô ñô ð øð1	ð 	ðð r.   c                óD   — | j         D ]}|                      |¦  «         ŒdS )zCWarn about source packages that were of interest, but never traced.N)r¢   Ú_warn_about_unmeasured_code)r´   rÈ   s     r,   Úwarn_unimported_sourcezInOrOut.warn_unimported_source$  s5   € àÔ-ð 	2ð 	2ˆCØ×,Ò,¨SÑ1Ô1Ð1Ð1ð	2ð 	2r.   rÈ   c                ó6  — t           j                             |¦  «        }|€|                      d|› d�d¬¦  «         dS t	          |¦  «        rdS t          |¦  «        s|                      d|› d�d¬¦  «         dS d|› d�}|                      |d	¬¦  «         dS )
z}Warn about a package or module that we never traced.

        `pkg` is a string, the name of the package or module.

        NzModule z was never imported.zmodule-not-importedrò   z has no Python source.zmodule-not-pythonz* was previously imported, but not measuredzmodule-not-measured)rr   r÷   r8   rŽ   rI   rM   )r´   rÈ   rC   rº   s       r,   rÿ   z#InOrOut._warn_about_unmeasured_code)  sÃ   € õ Œk�oŠo˜cÑ"Ô"ˆØˆ;Ø�IŠIÐ9 Ð9Ð9Ð9Ð@UˆIÑVÔVÐVØˆFå˜sÑ#Ô#ð 	ð ˆFå˜sÑ#Ô#ð 	Ø�IŠIÐ; Ð;Ð;Ð;ÐBUˆIÑVÔVÐVØˆFð
 H˜ÐGÐGÐGˆØ�	Š	�#Ð1ˆ	Ñ2Ô2Ð2Ð2Ð2r.   ú Iterable[tuple[str, str | None]]c              #  ó‚  K  — | j         D ]�}|t          j        vst          t          j        |         ¦  «        sŒ0t	          t          t          t          j        |         j        ¦  «        ¦  «        }|                      t          |¦  «        ¦  «        E d{V —† Œ�| j
        D ]}|                      |¦  «        E d{V —† ŒdS )z„Find files in the areas of interest that might be untraced.

        Yields pairs: file path, and responsible plug-in name.
        N)r–   rr   r÷   rM   r   r
   r%   rF   Ú_find_executable_filesr-   rž   )r´   rÈ   Úpkg_filerµ   s       r,   Úfind_possibly_unexecuted_filesz&InOrOut.find_possibly_unexecuted_filesC  s×   è è € ð
 Ô#ð 	Mð 	MˆCØ�#œ+Ð%Ð%­_½S¼[ÈÔ=MÑ-NÔ-NÐ%ØÝ&¥t­Cµ´¸SÔ1AÔ1JÑ'KÔ'KÑLÔLˆHØ×2Ò2µ>À(Ñ3KÔ3KÑLÔLÐLÐLÐLÐLÐLÐLÐLÐLàÔ#ð 	8ð 	8ˆCØ×2Ò2°3Ñ7Ô7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7ð	8ð 	8r.   Úsrc_dirúIterable[tuple[str, str]]c              #  ón   K  — | j         j        D ]%}|                     |¦  «        D ]}||j        fV — ŒŒ&dS )z&Get executable files from the plugins.N)rÖ   r×   Úfind_executable_filesrÞ   )r´   r  ræ   Úx_files       r,   Ú_find_plugin_fileszInOrOut._find_plugin_filesQ  s]   è è € à”lÔ/ð 	;ð 	;ˆFØ ×6Ò6°wÑ?Ô?ð ;ð ;�Ø˜fÔ:Ð:Ð:Ð:Ð:Ð:ð;ð	;ð 	;r.   c              #  ó  K  — d„ t          || j        ¦  «        D ¦   «         }|                      |¦  «        }t          j        ||¦  «        D ]<\  }}t          |¦  «        }| j        r| j                             |¦  «        rŒ6||fV — Œ=dS )a(  Find executable files in `src_dir`.

        Search for files in `src_dir` that can be executed because they
        are probably importable. Don't include ones that have been omitted
        by the configuration.

        Yield the file path, and the plugin name that handles the file.

        c              3  ó   K  — | ]}|d fV — Œ	d S ©NrQ   )rÀ   Úpy_files     r,   rÁ   z1InOrOut._find_executable_files.<locals>.<genexpr>a  s:   è è € ð 
ð 
àð �dˆOð
ð 
ð 
ð 
ð 
ð 
r.   N)r   r‘   r  Ú	itertoolsÚchainr   r°   rÆ   )r´   r  Úpy_filesÚplugin_filesÚ	file_pathrç   s         r,   r  zInOrOut._find_executable_filesW  s·   è è € ð
ð 
å,¨W°dÔ6UÑVÔVð
ñ 
ô 
ˆð ×.Ò.¨wÑ7Ô7ˆå&/¤o°hÀÑ&MÔ&Mð 	)ð 	)Ñ"ˆI�{Ý*¨9Ñ5Ô5ˆIØŒð  4¤?×#8Ò#8¸Ñ#CÔ#Cð ð Ø˜[Ð(Ð(Ð(Ð(Ð(ð	)ð 	)r.   úIterable[tuple[str, Any]]c                óÜ   — d| j         fd| j        fd| j        fd| j        fg}g d¢}|D ]B}t	          | |¦  «        }|r|                     ¦   «         }nd}|                     ||f¦  «         ŒC|S )z^Our information for Coverage.sys_info.

        Returns a list of (key, value) pairs.
        Úcoverage_pathsÚstdlib_pathsÚthird_party_pathsÚsource_in_third_party_paths)r¬   r­   r¯   r°   r±   r®   rÄ   rÇ   z-none-)r§   r¥   r¨   rÅ   rH   Úinfor    )r´   r  Úmatcher_namesÚmatcher_nameÚmatcherÚmatcher_infos         r,   Úsys_infozInOrOut.sys_infoo  s£   € ð ˜tÔ/Ð0Ø˜TÔ-Ð.Ø  $Ô"2Ð3Ø*¨DÔ,FÐGð	
ˆð	
ð 	
ð 	
ˆð *ð 	6ð 	6ˆLÝ˜d LÑ1Ô1ˆGØð (Ø&Ÿ|š|™~œ~��à'�Ø�KŠK˜ |Ð4Ñ5Ô5Ð5Ð5àˆr.   )
r�   r   rŽ   r   r�   r�   r‘   r#   r$   r^   )rº   r%   r$   r^   )r$   r^   r  )r/   r%   r0   r1   r$   r   ©r/   r%   r0   r1   r$   r2   )rÈ   r%   r$   r^   )r$   r  )r  r%   r$   r  )r  r%   r$   r  )r$   r  )r4   r€   r�   r‚   r¹   r©   r³   ré   râ   rô   rý   r   rÿ   r  r  r  r!  rQ   r.   r,   rŒ   rŒ   Ç   s5  € € € € € Ø:Ð:ðW1ð W1ð W1ð W1ðr"ð "ð "ð "ð
-
ð -
ð -
ð -
ð^dð dð dð dð dðL>ð >ð >ð >ð@bð bð bð bðð ð ð ðB2ð 2ð 2ð 2ð
3ð 3ð 3ð 3ð48ð 8ð 8ð 8ð;ð ;ð ;ð ;ð)ð )ð )ð )ð0ð ð ð ð ð r.   rŒ   )F)r!   r   r"   r#   r$   r%   r"  )rC   r   r$   r#   )rN   r%   r$   rO   )rZ   r[   r\   r]   r$   r^   )rZ   r[   r$   r^   )ru   r%   r$   r   )ru   r%   r$   r%   )Cr‚   Ú
__future__r   Úimportlib.utilrR   r;   r  r(   Úos.pathrr   ra   rß   Úcollections.abcr   Údataclassesr   Útypesr   r   Útypingr   r	   r
   rœ   r   Úcoverage.dispositionr   r   Úcoverage.exceptionsr   r   r   Úcoverage.filesr   r   r   r   r   r   Úcoverage.miscr   r   Úcoverage.pythonr   r   Úcoverage.typesr   r   r   r   Úcoverage.configr   Úcoverage.plugin_supportr    r-   rB   rI   rM   rY   ri   rm   rw   r}   r   rs   rŠ   rŒ   rQ   r.   r,   ú<module>r2     sO  ðð DÐ Cà "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø Ð Ð Ð Ø 	€	€	€	Ø €€€Ø 
€
€
€
Ø Ð Ð Ð Ø Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $Ø !Ð !Ð !Ð !Ð !Ð !Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ð +à Ð Ð Ð Ð Ð Ø BÐ BÐ BÐ BÐ BÐ BÐ BÐ BØ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ KÐ Kðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð <Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ø FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ FÐ Fàð 0Ø.Ð.Ð.Ð.Ð.Ð.Ø/Ð/Ð/Ð/Ð/Ð/ð €^�BÑÔ€ðð ð ð ð ðð ð ð ðDOð Oð Oð Oð
'ð 'ð 'ð 'ðð ð ð ð*3ð 3ð 3ð 3ð:ð :ð :ð :ð

ð 
ð 
ð 
ð5ð 5ð 5ð 5ð ðð ð ð ð ñ ô ñ „ððð ð ð ð	!ð 	!ð 	!ð 	!ðGð Gð Gð Gð Gñ Gô Gð Gð Gð Gr.   