
    He$                       d Z ddlmZ ddlZddlZddlmZmZ ddlm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZ erddlmZ e
de	f   Zereeej4                  e   f   Zneeej4                  f   Zeej8                  gZeee   eej8                     f   Z G d d	e      Ze Z!ee!e!f   Z" G d
 de      Z#eee!   ee"   ee    f   Z$eee$f   Z% G d de      Z&e	Z'eee(e e)eee   f      Z*eee(e e)eee   f      Z+eee*f   Z,eee+f   Z- G d de      Z. G d de      Z/eeef   Z0eeeeef         Z1 G d de      Z2 G d de      Z3 G d de      Z4 G d de      Z5y)z'
Types for use throughout coverage.py.
    )annotationsN)	FrameType
ModuleType)AnyCallableDictIterableListMappingOptionalProtocolSetTupleTypeUnionTYPE_CHECKING)
FileTracer.c                  .    e Zd ZdZ	 d	 	 	 	 	 	 	 	 	 ddZy)TTraceFnzA Python trace function.Nc                     y N )selfframeeventarglinenos        0/usr/lib/python3/dist-packages/coverage/types.py__call__zTTraceFn.__call__)   s     	    r   )
r   r   r   strr   r   r   zTLineNo | NonereturnTTraceFn | None__name__
__module____qualname____doc__r   r   r    r   r   r   '   s?    " "&  	
  
r    r   c                  X    e Zd ZU dZded<   ded<   ded<   ded<   ded	<   d
ed<   ded<   y)TFileDispositionz9A simple value type for recording what to do with a file.r!   original_filenamecanonical_filename
str | Nonesource_filenamebooltracereasonzFileTracer | Nonefile_tracerhas_dynamic_filenameNr%   r&   r'   r(   __annotations__r   r    r   r*   r*   9   s-    CKK""r    r*   c                      e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ded<   ddZddZddZddZddZ	ddZ
y)
TracerCorez-Anything that can report on Python execution.
TTraceDatadatar/   
trace_arcsz,Callable[[str, FrameType], TFileDisposition]should_tracez%Mapping[str, TFileDisposition | None]should_trace_cachez(Callable[[FrameType], str | None] | Noneshould_start_contextz#Callable[[str | None], None] | Noneswitch_contextTWarnFnwarnc                     y r   r   r   s    r   __init__zTracerCore.__init__\       r    c                     y)zDStart this tracer, return a trace function if based on sys.settrace.Nr   rB   s    r   startzTracerCore.start_       r    c                     y)zStop this tracer.Nr   rB   s    r   stopzTracerCore.stopb   rG   r    c                     y)zHas there been any activity?Nr   rB   s    r   activityzTracerCore.activitye   rG   r    c                     y)zReset the activity() flag.Nr   rB   s    r   reset_activityzTracerCore.reset_activityh   rG   r    c                     y)z+Return a dictionary of statistics, or None.Nr   rB   s    r   	get_statszTracerCore.get_statsk   rG   r    N)r"   None)r"   r#   )r"   r/   )r"   zdict[str, int] | None)r%   r&   r'   r(   r5   rC   rF   rI   rK   rM   rO   r   r    r   r7   r7   Q   sM    7
>>==BB77
MS +):r    r7   c                       e Zd ZdZddZddZy)TConfigurablez@Something that can proxy to the coverage configuration settings.c                     y)a<  Get an option from the configuration.

        `option_name` is a colon-separated string indicating the section and
        option name.  For example, the ``branch`` option in the ``[run]``
        section of the config file would be indicated with `"run:branch"`.

        Returns the value of the option.

        Nr   )r   option_names     r   
get_optionzTConfigurable.get_option   rG   r    c                     y)aB  Set an option in the configuration.

        `option_name` is a colon-separated string indicating the section and
        option name.  For example, the ``branch`` option in the ``[run]``
        section of the config file would be indicated with `"run:branch"`.

        `value` is the new value for the option.

        Nr   )r   rT   values      r   
set_optionzTConfigurable.set_option   rG   r    N)rT   r!   r"   zTConfigValueOut | None)rT   r!   rW   z!TConfigValueIn | TConfigSectionInr"   rP   )r%   r&   r'   r(   rU   rX   r   r    r   rR   rR   ~   s    J		r    rR   c                      e Zd ZdZddZy)TPluginConfigz/Something that can provide options to a plugin.c                     y)zGet the options for a plugin.Nr   )r   plugins     r   get_plugin_optionsz TPluginConfig.get_plugin_options   rG   r    N)r\   r!   r"   TConfigSectionOut)r%   r&   r'   r(   r]   r   r    r   rZ   rZ      s
    9,r    rZ   c                  &    e Zd ZU dZded<   ded<   y)TPluginz What all plugins have in common.r!   _coverage_plugin_namer/   _coverage_enabledNr4   r   r    r   r`   r`      s    *r    r`   c                      e Zd ZdZdddZy)r?   zA callable warn() function.Nc                     y r   r   )r   msgslugonces       r   r   zTWarnFn.__call__   rD   r    )NF)re   r!   rf   r-   rg   r/   r"   rP   r$   r   r    r   r?   r?      s
    %r    r?   c                       e Zd ZdZddZddZy)	TDebugCtlz,A DebugControl object, or something like it.c                     y)z@Decide whether to output debug information in category `option`.Nr   )r   options     r   shouldzTDebugCtl.should   rG   r    c                     y)zWrite a line of debug output.Nr   r   re   s     r   writezTDebugCtl.write   rG   r    N)rk   r!   r"   r/   re   r!   r"   rP   )r%   r&   r'   r(   rl   ro   r   r    r   ri   ri      s    6O,r    ri   c                      e Zd ZdZddZy)	TWritablez Anything that can be written to.c                     y)zWrite a message.Nr   rn   s     r   ro   zTWritable.write   rG   r    Nrp   )r%   r&   r'   r(   ro   r   r    r   rr   rr      s
    *r    rr   )6r(   
__future__r   ospathlibtypesr   r   typingr   r   r   r	   r
   r   r   r   r   r   r   r   r   coverage.pluginr   AnyCallabler!   PathLikeFilePathPathFilePathClassesFilePathTyper   intTLineNoTArcr*   TTraceFileDatar8   r7   
TCovKwargsr/   floatTConfigValueInTConfigValueOutTConfigSectionInr^   rR   rZ   TMorfTSourceTokenLinesr`   r?   ri   rr   r   r    r   <module>r      s   # 	  '   
 * sCx 
 S"++c**+H S"++%&H%T#YW\\ 223	x 	 Wg	x 	( s7|SYC89#~%&
: :B 
 %c5#x} DEF5sE3S	!ABC3./ C01 H 2,H , 	j#oT%S/23 h h , , r    