Ë
    oPêjý
  ã                  ód   — d Z ddlm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y
)z"Determine contexts for coverage.pyé    )Úannotations)ÚSequence)ÚCO_OPTIMIZED)Ú	FrameType)ÚTShouldStartContextFnc                ó@   ‡ — ‰ sy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   c                ó0   •— ‰D ]  } || «      }|€Œ|c S  y)z,The combiner for multiple context switchers.N© )ÚframeÚswitcherÚnew_contextÚcontext_switcherss      €úU/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/coverage/context.pyÚshould_start_contextz7combine_context_switchers.<locals>.should_start_context$   s,   ø€ à)ò 	#ˆHÙ" 5›/ˆKØÑ&Ø"Ò"ð	#ð ó    ©r   r   Úreturnz
str | None)Úlen)r   r   s   ` r   Úcombine_context_switchersr      s1   ø€ ñ Øä
ÐÓ Ò"Ø  Ñ#Ð#õð  Ðr   c                ór   — | j                   j                  }|j                  d«      s|dk(  rt        | «      S y)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   /   s4   € à�l‰l×"Ñ"€GØ×Ñ˜&Ô! W°	Ò%9Ü" 5Ó)Ð)Ør   c                ód  — | j                   }|j                  }d}|j                  r;|j                  d   dk(  r)| j                  j                  dd«      }t        ||d«      }|€z| j                  j                  |«      }|€L|j                  t        z  r8d|j                  vr*| j                  j                  d«      › d|j                  › �S y|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   Úselfz<locals>Ú__name__ú.Ú__func__)r   r   Úco_argcountÚco_varnamesÚf_localsÚgetÚgetattrÚ	f_globalsÚco_flagsr   Úco_qualnameÚ
__module__Ú	__class__r!   Ú__qualname__)r   ÚcoÚfnameÚmethodr    ÚfuncÚclss          r   r   r   7   s#  € à	�‰€BØ�J‰J€EØ€FØ	‡~‚~˜"Ÿ.™.¨Ñ+¨vÒ5Ø�~‰~×!Ñ! &¨$Ó/ˆÜ˜˜u dÓ+ˆà€~Ø�‰×"Ñ" 5Ó)ˆØˆ<ð �{‰{œ\Ò)¨jÀÇÁÑ.NØŸ/™/×-Ñ-¨jÓ9Ð:¸!¸B¿N¹NÐ;KÐLÐLØØ—/‘/Ð" ! E 7Ð+Ð+ä�6˜: tÓ,€DØ€|Ø�n‰nˆØ—.‘.Ð!  3§<¡< .°°%°Ð9Ð9à�o‰oÐ˜a × 1Ñ 1Ð2Ð3Ð3r   N)r   zSequence[TShouldStartContextFn]r   zTShouldStartContextFn | Noner   )Ú__doc__Ú
__future__r   Úcollections.abcr   Úinspectr   Útypesr   Úcoverage.typesr   r   r   r   r   r   r   ú<module>r:      s9   ðñ )å "å $Ý  Ý å 0ð Ø6ð à!ó ó@ô4r   