Edit File: context.cpython-311.pyc
� ����q�d� ����������������������R�����d�Z�ddlmZ�ddlmZ�ddlmZmZmZm Z �dd �Z dd �Zdd�ZdS�)z"Determine contexts for coverage.py�����)�annotations)� FrameType)�cast�Callable�Optional�Sequence�context_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����switcher�new_contextr ���s��� ��c/builddir/build/BUILD/cloudlinux-venv-1.0.2/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|dk����rt����������|�������������S�dS�)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���������dk����r,|�j�����������������������������dd������������}t ����������||d������������}|�>|�j�����������������������������|������������}|�dS�t����������t����������|j ��������dz���|z���������������S�t ����������|dd������������}|�2|j��������}t����������t����������|j ��������dz���|j��������z���dz���|z���������������S�t����������t����������|j ��������dz���|j ��������z���������������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_globalsr����str� __module__� __class__�__name__�__qualname__)r����co�fname�methodr$����func�clss��� r���r!���r!���4���s������� ��B��J�E� �F� �~��,�"�.��+�v�5�5��~�!�!�&�$�/�/����u�d�+�+�� �~���"�"�5�)�)���<��4��C���3�.��6�7�7�7��6�:�t�,�,�D��|��n���C���#�-���<�s�B�U�J�K�K�K���T�_�s�*�T�->�>�?�?�?r���N)r ���r ���r���r���r���) �__doc__� __future__r����typesr����typingr���r���r���r���r���r"���r!���r���r���r����<module>r;������s�������)��(��"��"��"��"��"��"��������������5��5��5��5��5��5��5��5��5��5��5��5� �� �� �� �@�������@��@��@��@��@��@r���