B\pJ_RdZddlmZddlmZddlmZmZmZm Z dd Z dd Z ddZ dS)z"Determine contexts for coverage.py) annotations) FrameType)castCallableOptionalSequencecontext_switchers.Sequence[Callable[[FrameType], Optional[str]]]return.Optional[Callable[[FrameType], Optional[str]]]cRsdStdkrdSd fd }|S) aCreate 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. Nrframerr Optional[str]c4D]}||}||cSdS)z,The combiner for multiple context switchers.N)rswitcher new_contextr s /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/coverage/context.pyshould_start_contextz7combine_context_switchers..should_start_context!s;) # #H"(5//K&""""'trrr r)len)r rs` rcombine_context_switchersr sW t "" ## rrrrcr|jj}|ds|dkrt|SdS)z(Is this frame calling a test_* function?testrunTestN)f_codeco_name startswithqualname_from_frame)rrs r"should_start_context_test_functionr",s?l"G&!!*W %9%9"5))) 4rc|j}|j}d}|jr=|jddkr,|jdd}t ||d}|>|j|}|dStt|j dz|zSt |dd}|2|j }tt|j dz|j zdz|zStt|j dz|j zS)z5Get a qualified name for the code running in `frame`.Nrself.__func__)rr co_argcount co_varnamesf_localsgetgetattr f_globalsrstr __module__ __class____name__ __qualname__)rcofnamemethodr$funcclss rr!r!4s B JE F ~,".+v55~!!&$//ud++ ~""5)) <4C3.6777 6:t , ,D |nC#- > ? ??rN)r r r r r) __doc__ __future__rtypesrtypingrrrrrr"r!rrrr;s)(""""""555555555555    @@@@@@@r