B\pJ_ R d Z ddlmZ ddlmZ ddlmZmZmZm Z dd Z
dd
ZddZdS )z"Determine contexts for coverage.py )annotations) FrameType)castCallableOptionalSequencecontext_switchers.Sequence[Callable[[FrameType], Optional[str]]]return.Optional[Callable[[FrameType], Optional[str]]]c R sdS t dk r d S d fd}|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
Optional[str]c 4 D ]} || }||c S dS )z,The combiner for multiple context switchers.N )r switchernew_contextr s d/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/coverage/context.pyshould_start_contextz7combine_context_switchers.>???r N)r r
r r r )
__doc__
__future__r typesr typingr r r r r r" r! r r r