Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/coverage/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/coverage/__pycache__/jsonreport.cpython-311.pyc

�

�܋f�����dZddlmZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZddlmZddlmZddlmZmZddlmZmZerdd	lmZdd
lmZGd�d��Zdd�ZdS)zJson reporting for coverage.py�)�annotationsN)�Any�Dict�IO�Iterable�List�Optional�Tuple�
TYPE_CHECKING)�__version__)�get_analysis_to_report)�Analysis�Numbers)�TMorf�TLineNo)�Coverage)�CoverageDatac�.�eZdZdZdZdd�Zdd
�Zdd�ZdS)�JsonReporterz-A reporter for writing JSON coverage results.zJSON report�coverager�return�Nonec��||_|jj|_t|jj��|_i|_dS)N)r�configr�	precision�total�report_data)�selfrs  �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/coverage/jsonreport.py�__init__zJsonReporter.__init__s7�� ��
��m�*����T�[�2�3�3��
�+-������morfs�Optional[Iterable[TMorf]]�outfile�IO[str]�floatc���|ptj}|j���}|�|jj��ttj�	���
��|���|jjd�|j
d<i}t|j|��D]0\}}|�||��||���<�1||j
d<|jj|jj|jj|jj|jj|jjd�|j
d<|���rM|j
d�|jj|jj|jj|jjd���t;j|j
||jjrdnd�	��|jjo|jjS)
z�Generate a json report for `morfs`.

        `morfs` is a list of modules or file names.

        `outfile` is a file object to write the json to.

        )�version�	timestamp�branch_coverage�
show_contexts�meta�files��
covered_lines�num_statements�percent_covered�percent_covered_display�
missing_lines�excluded_lines�totals��num_branches�num_partial_branches�covered_branches�missing_branches�N)�indent) �sys�stdoutr�get_data�set_query_contextsr�report_contextsr�datetime�now�	isoformat�has_arcs�json_show_contextsrr
�report_one_file�relative_filenamer�
n_executed�n_statements�
pc_covered�pc_covered_str�	n_missing�
n_excluded�update�
n_branches�n_partial_branches�n_executed_branches�n_missing_branches�json�dump�json_pretty_print)rr"r$�
coverage_data�measured_files�
file_reporter�analysiss       r�reportzJsonReporter.report#s����'�S�Z���
�.�.�0�0�
��(�(���)D�E�E�E�"�!�*�.�.�0�0�:�:�<�<�,�5�5�7�7�!�[�;�	$
�$
���� ���'=�d�m�U�'S�'S�	�	�#�M�8�@D�@T�@T���A�A�N�=�:�:�<�<�=�=�
%3����!�"�Z�2�"�j�5�#�z�4�'+�z�'@�!�Z�1�"�j�3�
&
�&
����"��!�!�#�#�	���X�&�-�-� $�
� 5�(,�
�(E�$(�J�$B�$(�J�$A�	/�/�
�
�
�	
�	������6�@�A�A�D�	
�	
�	
�	
��z�&�@�4�:�+@�@r!rWrrZr�Dict[str, Any]c��|j}|xj|z
c_|j|j|j|j|j|jd�}t|j	��|t|j
��t|j��d�}|jj
r"|j�|j��|d<|���r�|�|j|j|j|jd���t/t1|�������|d<t/t1|�������|d<|S)z3Extract the relevant report data for a single file.r.)�executed_lines�summaryr3r4�contextsr6�executed_branchesr:)�numbersrrIrJrKrLrMrN�sorted�executed�missing�excludedrrF�data�contexts_by_lineno�filenamerErOrPrQrRrS�list�_convert_branch_arcs�executed_branch_arcs�missing_branch_arcs)rrWrZ�numsr_�
reported_files      rrGzJsonReporter.report_one_fileWs]������
�
�d��
�
�!�_�"�/�#��'+�':�!�^�"�o�

�
��%�X�%6�7�7��#�H�$4�5�5�$�X�%6�7�7�	
�
�
��;�)�	\�(0�
�(H�(H��IZ�([�([�M�*�%��!�!�#�#�	��N�N� $��(,�(?�$(�$<�$(�$;�	��
�
�
�26�$�X�%B�%B�%D�%D�E�E�2�2�M�-�.�15�$�X�%A�%A�%C�%C�D�D�1�1�M�,�-��r!N)rrrr)r"r#r$r%rr&)rWrrZrrr\)�__name__�
__module__�__qualname__�__doc__�report_typer r[rG�r!rrrs`������7�7��K�.�.�.�.�2A�2A�2A�2A�h!�!�!�!�!�!r!r�branch_arcs�Dict[TLineNo, List[TLineNo]]r�!Iterable[Tuple[TLineNo, TLineNo]]c#�TK�|���D]\}}|D]}||fV��	�dS)z4Convert branch arcs to a list of two-element tuples.N)�items)rv�source�targets�targets    rrkrk{sX����'�,�,�.�.�!�!�����	!�	!�F��&�.� � � � �	!�!�!r!)rvrwrrx)rs�
__future__rrBrTr=�typingrrrrrr	r
rrr�coverage.report_corer
�coverage.resultsrr�coverage.typesrrr�
coverage.datarrrkrur!r�<module>r�sE��%�$�"�"�"�"�"�"���������
�
�
�
�P�P�P�P�P�P�P�P�P�P�P�P�P�P�P�P�P�P�P�P� � � � � � �7�7�7�7�7�7�.�.�.�.�.�.�.�.�)�)�)�)�)�)�)�)��+�!�!�!�!�!�!�*�*�*�*�*�*�`�`�`�`�`�`�`�`�F!�!�!�!�!�!r!

Hacked By AnonymousFox1.0, Coded By AnonymousFox