§
    0›j‚	  ã                  óR   — d Z ddlmZ ddlmZ ddlmZ ddlmZ dd
„Z	dd„Z
dd„ZdS )z"Determine contexts for coverage.pyé    )Úannotations)ÚSequence)Ú	FrameType)ÚTShouldStartContextFnÚcontext_switchersúSequence[TShouldStartContextFn]ÚreturnúTShouldStartContextFn | Nonec                óR   ‡ — ‰ sdS t          ‰ ¦  «        dk    r‰ d         S d	ˆ fd„}|S )
a  Create a single context switcher from multiple switchers.

    `context_switchers` is a list of functions that take a frame as an
    argument and return a string to use as the new context label.

    Returns a function that composites `context_switchers` functions, or None
    if `context_switchers` is an empty list.

    When invoked, the combined switcher calls `context_switchers` one-by-one
    until a string is returned.  The combined switcher returns None if all
    `context_switchers` return None.
    Né   r   Úframer   r	   ú
str | Nonec                ó4   •— ‰D ]} || ¦  «        }|�|c S ŒdS )z,The combiner for multiple context switchers.N© )r   ÚswitcherÚnew_contextr   s      €úO/home/lighthouse/health/venv/lib64/python3.11/site-packages/coverage/context.pyÚshould_start_contextz7combine_context_switchers.<locals>.should_start_context#   s;   ø€ à)ð 	#ð 	#ˆHØ"˜( 5™/œ/ˆKØÐ&Ø"Ð"Ð"Ð"ð 'àˆtó    ©r   r   r	   r   )Úlen)r   r   s   ` r   Úcombine_context_switchersr      sW   ø€ ð ð Øˆtå
ÐÑÔ Ò"Ð"Ø  Ô#Ð#ðð ð ð ð ð ð  Ðr   r   r   r   c                ór   — | j         j        }|                     d¦  «        s|dk    rt          | ¦  «        S dS )z(Is this frame calling a test_* function?ÚtestÚrunTestN)Úf_codeÚco_nameÚ
startswithÚqualname_from_frame)r   r   s     r   Ú"should_start_context_test_functionr    .   s?   € àŒlÔ"€GØ×Ò˜&Ñ!Ô!ð * W°	Ò%9Ð%9Ý" 5Ñ)Ô)Ð)Øˆ4r   c                ó€  — | j         }|j        }d}|j        r=|j        d         dk    r,| j                             dd¦  «        }t          ||d¦  «        }|€*| j                             |¦  «        }|€dS |j        › d|› �S t          |dd¦  «        }|€|j	        }|j        › d|j
        › d|› �S |j        › d|j        › �S )z5Get a qualified name for the code running in `frame`.Nr   Úselfú.Ú__func__)r   r   Úco_argcountÚco_varnamesÚf_localsÚgetÚgetattrÚ	f_globalsÚ
__module__Ú	__class__Ú__name__Ú__qualname__)r   ÚcoÚfnameÚmethodr"   ÚfuncÚclss          r   r   r   6   sè   € à	Œ€BØŒJ€EØ€FØ	„~ð ,˜"œ.¨Ô+¨vÒ5Ð5ØŒ~×!Ò! &¨$Ñ/Ô/ˆÝ˜˜u dÑ+Ô+ˆà€~ØŒ×"Ò" 5Ñ)Ô)ˆØˆ<Ø�4Ø”/Ð+Ð+ EÐ+Ð+Ð+å�6˜: tÑ,Ô,€DØ€|ØŒnˆØ”.Ð9Ð9 3¤<Ð9Ð9°%Ð9Ð9Ð9àŒoÐ3Ð3 Ô 1Ð3Ð3Ð3r   N)r   r   r	   r
   r   )Ú__doc__Ú
__future__r   Úcollections.abcr   Útypesr   Úcoverage.typesr   r   r    r   r   r   r   ú<module>r9      sœ   ðð )Ð (à "Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $Ø Ð Ð Ð Ð Ð à 0Ð 0Ð 0Ð 0Ð 0Ð 0ð ð  ð  ð  ð@ð ð ð ð4ð 4ð 4ð 4ð 4ð 4r   