| Server IP : 46.245.81.90 / Your IP : 216.73.216.133 Web Server : Apache System : Linux server3ir.xdlhost.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64 User : gmparts ( 1037) PHP Version : 8.1.34 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/coverage/__pycache__/ |
Upload File : |
�
1j� � �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 ��d/builddir/build/BUILD/cloudlinux-venv-1.0.11/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"