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__/report.cpython-311.pyc

�

�܋f)���dZddlmZddlZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlmZdd	lmZmZdd
lmZerddlmZGd�d
��ZdS)zSummary reporting�)�annotationsN)�Any�IO�Iterable�List�Optional�Tuple�
TYPE_CHECKING)�ConfigError�NoDataError)�human_sorted_items)�FileReporter)�get_analysis_to_report)�Analysis�Numbers)�TMorf)�Coveragec�T�eZdZdZd#d�Zd$d	�Zd%d�Zd&d�Zd&d�Zd'd(d�Z	d)d�Z
d*d"�ZdS)+�SummaryReporterz*A reporter for writing the summary report.�coverager�return�Nonec�h�||_|jj|_|������|_d|_|jjpd|_|jdvrtd|j�����g|_	d|_
d|_t|jj
���|_dS)N�text>r�total�markdownzUnknown report format choice: r)�	precision)r�config�get_data�has_arcs�branches�outfile�format�
output_formatr�fr_analysis�
skipped_count�empty_countrrr)�selfrs  �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/coverage/report.py�__init__zSummaryReporter.__init__s��� ��
��m�*��� �)�)�+�+�4�4�6�6��
�*.���!�[�/�9�6�����%B�B�B��U�t�?Q�U�U�V�V�V�@B����������t�{�'<�=�=�=��
�
�
��line�strc��|j�J�|j�|�����|j�d��dS)z-Write a line to the output, adding a newline.N�
)r"�write�rstrip)r(r,s  r)r0zSummaryReporter.write'sJ���|�'�'�'�����4�;�;�=�=�)�)�)�����4� � � � � r+�items�
Iterable[str]c�V�|�d�|����dS)z)Write a list of strings, joined together.�N)r0�join)r(r2s  r)�write_itemszSummaryReporter.write_items-s$���
�
�2�7�7�5�>�>�"�"�"�"�"r+�header�	List[str]�lines_values�List[List[Any]]�
total_line�	List[Any]�	end_linesc	�����
�td�|D��dgz��dz�
tt|��d����dztd����dz�t�g�fd�|D��z���tdd	d	d	d	d
d�������
fd
��D��}d�|��}dt|��z}|�|��|�|����td���d���|D]5}���
fd�t�|��D��}	|�|	���6|r|�|�����
fd�t�|��D��}	|�|	��|D]}
|�|
���dS)a:Internal method that prints report data in text format.

        `header` is a list with captions.
        `lines_values` is list of lists of sortable values.
        `total_line` is a list with values of the total line.
        `end_lines` is a list of ending lines with information about skipped files.

        c�8�g|]}t|d����S)r)�len��.0r,s  r)�
<listcomp>z0SummaryReporter._report_text.<locals>.<listcomp>As"��>�>�>���D��G���>�>�>r+���Cover�z Coverc�f��g|]-}t|��d����dz��.S)rGrH)rA�index)rCr,r8s  �r)rDz0SummaryReporter._report_text.<locals>.<listcomp>Cs7���]�]�]��s�4����W�(=�(=�#>�?�?�!�C�]�]�]r+z
{:{name_len}}z{:>7}z{:>{n}}z{:>10}��Name�Stmts�Miss�Branch�BrPartrG�Missingc�L��g|] }�|�|�������!S���name_len�n�r#�rC�item�formats�max_n�max_names  ���r)rDz0SummaryReporter._report_text.<locals>.<listcomp>MsB���
�
�
��
�D�M� � ���E� �B�B�
�
�
r+r5�-z{:>{n}}%�rGz   {:9})rQc�r��g|]3\}}�|�t|����dz
�����4S�rFrT�r#r-�rCrY�valuerZr[r\s   ���r)rDz0SummaryReporter._report_text.<locals>.<listcomp>[sW������2=�$����
�$�$�S��Z�Z�!�U�1�W�%�.�.���r+c�r��g|]3\}}�|�t|����dz
�����4Sr`rarbs   ���r)rDz0SummaryReporter._report_text.<locals>.<listcomp>esW���
�
�
�.9�d�E�
�D�M� � ��U�����q��
!�
*�
*�
�
�
r+N)	�maxrArJ�dictr6r0�update�zipr7)r(r8r:r<r>�header_items�
header_str�rule�values�
line_items�end_linerZr[r\s `         @@@r)�_report_textzSummaryReporter._report_text1sX������ �>�>��>�>�>�!��D�E�E��I���C�
�6�<�<��#8�#8�9�:�:�Q�>��H�
�
�N�N�QR�R���U�G�]�]�]�]�P\�]�]�]�]�^�^��� �������
�
�
��
�
�
�
�
�
��
�
�
���W�W�\�*�*�
��S��_�_�$��	
�
�
�:�����
�
�4�������t�*�-�-�-�y��A�A�A�"�	)�	)�F�������AD�V�V�AT�AT����J�
���Z�(�(�(�(��	��J�J�t����
�
�
�
�
�
�=@���=T�=T�
�
�
�
�	
����$�$�$�!�	!�	!�H��J�J�x� � � � �	!�	!r+c	�����td�|D��d����t�td����dz�tddddddd	�
���tt||�d����dztd
��������fd�|D��}d�|��}dd�d�t|d��dz
d��gd�|dd�D��z��z}|�|��|�|��|D]X}��td��������fd�t||��D��}	|�	|	���Y��tdd�����g}
t||��D]B\}}|dkr|}
n|dkrd|�d�}
nd|�d�}
|
�|�
|
�����z
}
�C|�	|
��|D]}|�|���dS)aTInternal method that prints report data in markdown format.

        `header` is a list with captions.
        `lines_values` is a sorted list of lists containing coverage information.
        `total_line` is a list with values of the total line.
        `end_lines` is a list of ending lines with information about skipped files.

        c3�hK�|]-}t|d�dd����V��.dS)r�_�\_N)rA�replacerBs  r)�	<genexpr>z3SummaryReporter._report_markdown.<locals>.<genexpr>~s<����R�R�T��D��G�O�O�C��7�7�8�8�R�R�R�R�R�Rr+r)�defaultz	**TOTAL**rFz| {:{name_len}}|z{:>9} |z	{:>{n}} |z{:>10} |rKrG�z Cover c�L��g|] }�|�|�������!SrSrWrXs  ���r)rDz4SummaryReporter._report_markdown.<locals>.<listcomp>�s3���b�b�b�SW���
�,�,�T�H��,�N�N�b�b�br+r5�|� z- |r]c�Z�g|](}d�t|��dz
d����)S)z-: |rFr])�rjustrA)rCrYs  r)rDz4SummaryReporter._report_markdown.<locals>.<listcomp>�s0��I�I�I��V�\�\�#�d�)�)�A�+�s�
+�
+�I�I�Ir+Nz
{:>{n}}% |r^c���g|]G\}}�|�t|���dd����dz
�����HS)rrrsrFrT)r#r-rtrbs   ���r)rDz4SummaryReporter._report_markdown.<locals>.<listcomp>�sc�������D�%���
�$�$�S��Z�Z�%7�%7��U�%C�%C�h�Z_�`a�Za�$�b�b���r+z|{:>{name_len}} |)rLrGz **z%**z**rT)rerArfrJr6r|r0rgrhr7r#)r(r8r:r<r>rirj�rule_strrlrm�total_line_itemsrYrc�insertrnrZr[r\s               @@@r)�_report_markdownz SummaryReporter._report_markdownns������ �R�R�\�R�R�R�\]�^�^�^���x��[�!1�!1�2�2�Q�6���#�������
�
�
���C�
�6�<�<��#8�#8�9�:�:�Q�>��I���O�O��b�b�b�b�b�b�[a�b�b�b���W�W�\�*�*�
�����5�;�;�s�<��?�/C�/C�A�/E�s�#K�#K�"L�I�I��Q�R�R�8H�I�I�I�#J�
�
�
��
	
�
�
�:�����
�
�8����"�	)�	)�F��N�N�4�l�3�3�3�4�4�4�������#&�v�v�#6�#6����J�
���Z�(�(�(�(�	���t�!4�K�H�H�H�I�I�I�&(���v�z�2�2�	Y�	Y�K�D�%���{�{��������)�u�)�)�)���(�u��������
� 4� 4�V�h�RW� 4� X� X�X������)�*�*�*�!�	!�	!�H��J�J�x� � � � �	!�	!r+N�morfs�Optional[Iterable[TMorf]]r"�Optional[IO[str]]�floatc���|ptj|_|j����|jj��t|j|��D]\}}|�	||���|j
js|jstd���|jdkr |�|j
j��n|���|j
jS)z�Writes a report summarizing coverage statistics per module.

        `outfile` is a text-mode file object to write the summary to.

        zNo data to report.r)�sys�stdoutr"rr�set_query_contextsr�report_contextsr�report_one_filer�n_filesr&rr$r0�pc_covered_str�tabular_report�
pc_covered)r(r�r"�fr�analysiss     r)�reportzSummaryReporter.report�s����,�#�*����
��� � �3�3�D�K�4O�P�P�P�2�4�=�%�H�H�	/�	/�L�B��� � ��X�.�.�.�.��z�!�	4�$�*<�	4��2�3�3�3����(�(��J�J�t�z�0�1�1�1�1����!�!�!��z�$�$r+c���gd�}|jr|ddgz
}|dgz
}|jjr|dgz
}tdddd	�
��}|jr$|�tdd�
����g}|jD]�\}}|j}|���|j|j	g}|jr||j
|jgz
}||jgz
}|jjr||�
d���gz
}||jgz
}|�|����|jjpd���}d}	|ddkr
d}	|dd�}n|ddkr
|dd�}|�|�����t'd|jj�����|dkrt)||	���}n|��fd�|	���d|jj|jj	g}
|jr|
|jj
|jjgz
}
|
|jjgz
}
|jjr|
dgz
}
g}|jjr7|jr0|jdkrdnd}|�d|j�d|�d���|jjr7|jr0|jdkrdnd}|�d|j�d|�d ���|jd!kr|j}
n|j}
|
|||
|��dS)"zWrites tabular report formats.)rLrMrNrOrPrGrQrrFrH���)�name�stmts�miss�cover��)�branch�brpartT)r!r�Fr]N�+zInvalid sorting option: )�reversec�$��|�|dfS)Nr�)r,�sort_idxs �r)�<lambda>z0SummaryReporter.tabular_report.<locals>.<lambda>�s���$�x�.�$�q�'�!:�r+)�keyr��TOTALr5�sr/z filez" skipped due to complete coverage.z empty filez	 skipped.r)r!r�show_missingrfrgr%�numbers�relative_filename�n_statements�	n_missing�
n_branches�n_partial_branchesr��missing_formattedr��append�sort�lower�getrr
r�skip_coveredr&�
skip_emptyr'r$r�ro)r(r8�column_orderr:r�r��nums�args�sort_optionr�r<r>�file_suffix�	formatterr�s              @r)r�zSummaryReporter.tabular_report�s����+�*�*���=�	+��x��*�*�F��7�)����;�#�	"��y�k�!�F���!�!�2�>�>�>���=�	:�����A�a� 8� 8� 8�9�9�9���"�.�
	&�
	&�N�R���#�D��(�(�*�*�D�,=�t�~�N�D��}�
C����$�*A�B�B���T�(�)�)�D��{�'�
D���3�3�T�3�B�B�C�C���T�_�%�%�D�����%�%�%�%��{�'�1�6�8�8�:�:�����q�>�S� � ��G�%�a�b�b�/�K�K�
��^�s�
"�
"�%�a�b�b�/�K��#�#�K�0�0�����M���9I�M�M�N�N�N��&� � �-�l�G�L�L�L�L�L����:�:�:�:��
�
�
�
��t�z�6��
�8L�M�
��=�	Q��4�:�0�$�*�2O�P�P�J��t�z�0�1�1�
��;�#�	��2�$��J��	��;�#�	��(:�	�!%�!3�A�!5�!5�#�#�2�K����]�T�'�]�]�k�]�]�]�
�
�
��;�!�	W�d�&6�	W�!%�!1�A�!5�!5�#�#�2�K����U�$�"2�U�U�{�U�U�U�V�V�V����+�+��-�I�I��)�I��	�&�,�
�I�>�>�>�>�>r+r�rr�rc�.�|j}|xj|z
c_|jdk}|jdk}|jjr|r|r|xjdz
c_dS|jjr|jdkr|xj	dz
c_	dS|j
�||f��dS)z4Report on just one file, the callback from report().rrFN)r�rr�r�rr�r&r�r�r'r%r�)r(r�r�r��no_missing_lines�no_missing_branchess      r)r�zSummaryReporter.report_one_files�������
�
�d��
�
� �N�a�/��#�6�!�;���;�#�	4�(8�	4�=P�	4����!�#�����
�[�
#�	4��(9�Q�(>�(>�����!�������#�#�R��N�3�3�3�3�3r+)rrrr)r,r-rr)r2r3rr)
r8r9r:r;r<r=r>r9rr)N)r�r�r"r�rr�)rr)r�rr�rrr)�__name__�
__module__�__qualname__�__doc__r*r0r7ror�r�r�r�r�r+r)rrs�������4�4�>�>�>�>�!�!�!�!�#�#�#�#�;!�;!�;!�;!�z<!�<!�<!�<!�|%�%�%�%�%�,G?�G?�G?�G?�R4�4�4�4�4�4r+r)r��
__future__rr��typingrrrrrr	r
�coverage.exceptionsrr�
coverage.miscr
�coverage.pluginr�coverage.report_corer�coverage.resultsrr�coverage.typesrrrrr�r+r)�<module>r�s,����"�"�"�"�"�"�
�
�
�
�J�J�J�J�J�J�J�J�J�J�J�J�J�J�J�J�J�J�8�8�8�8�8�8�8�8�,�,�,�,�,�,�(�(�(�(�(�(�7�7�7�7�7�7�.�.�.�.�.�.�.�.� � � � � � ��"�!�!�!�!�!�!�B4�B4�B4�B4�B4�B4�B4�B4�B4�B4r+

Hacked By AnonymousFox1.0, Coded By AnonymousFox