Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/utils/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/pylint/utils/__pycache__/linterstats.cpython-311.pyc

�

�܋f
1��4�ddlmZddlZddlmZddlmZejdkr	ddlmZm	Z	nddl
mZm	Z	Gd�de	��ZGd	�d
e	��ZGd�de	��Z
Gd
�de	��ZGd�de	��ZGd�de	��ZGd�d��Zdd�ZdS)�)�annotationsN)�cast)�MessageTypesFullName)��)�Literal�	TypedDictc��eZdZUdZded<ded<ded<ded<ded<ded<ded	<ded
<ded<ded<ded
<ded<ded<dS)�BadNamesz7TypedDict to store counts of node types with bad names.�int�argument�attr�klass�class_attribute�class_const�const�	inlinevar�function�method�module�variable�typevar�	typealiasN��__name__�
__module__�__qualname__�__doc__�__annotations__���i/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/utils/linterstats.pyrrs��������A�A��M�M�M�
�I�I�I��J�J�J����������J�J�J��N�N�N��M�M�M��K�K�K��K�K�K��M�M�M��L�L�L��N�N�N�N�Nr!rc�F�eZdZUdZded<ded<ded<ded<ded<dS)	�
CodeTypeCountz1TypedDict to store counts of lines of code types.r�code�comment�	docstring�empty�totalNrr r!r"r$r$$sC�������;�;�
�I�I�I��L�L�L��N�N�N��J�J�J��J�J�J�J�Jr!r$c�(�eZdZUdZded<ded<dS)�DuplicatedLinesz6TypedDict to store counts of lines of duplicated code.r�nb_duplicated_lines�float�percent_duplicated_linesNrr r!r"r+r+.s0�������@�@�����#�#�#�#�#�#r!r+c�<�eZdZUdZded<ded<ded<ded<dS)�	NodeCountz6TypedDict to store counts of different types of nodes.rrrrrNrr r!r"r0r05s:�������@�@��M�M�M��J�J�J��K�K�K��K�K�K�K�Kr!r0c�<�eZdZUdZded<ded<ded<ded<dS)�UndocumentedNodesz5TypedDict to store counts of undocumented node types.rrrrrNrr r!r"r2r2>s:�������?�?��M�M�M��J�J�J��K�K�K��K�K�K�K�Kr!r2c�Z�eZdZUdZded<ded<ded<ded<ded<ded<ded	<d
S)�ModuleStatsz>TypedDict to store counts of types of messages and statements.r�
convention�error�fatal�info�refactor�	statement�warningNrr r!r"r4r4GsU�������H�H��O�O�O��J�J�J��J�J�J�
�I�I�I��M�M�M��N�N�N��L�L�L�L�Lr!r4c��eZdZdZ								d4d5d�Zd6d�Zd6d�Zd7d�Zd8d�Zd9d �Z	d:d!�Z
d;d$�Zd:d%�Zd:d&�Z
d<d(�Zd:d)�Zd=d+�Zd:d,�Zd>d-�Zd?d/�Zd@d0�ZdAd2�Zd:d3�ZdS)B�LinterStatszClass used to linter stats.N�	bad_names�BadNames | None�	by_module�dict[str, ModuleStats] | None�by_msg�dict[str, int] | None�code_type_count�CodeTypeCount | None�dependencies�dict[str, set[str]] | None�duplicated_lines�DuplicatedLines | None�
node_count�NodeCount | None�undocumented�UndocumentedNodes | None�return�Nonec	���|ptddddddddddddd��
�
|_|pi|_|pi|_|pt	ddddd���|_|pi|_|ptdd���|_|ptdddd���|_
|ptdddd���|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr�
r
rrrrrrrrrrrr�r%r&r'r(r)��r,r.�rrrr)rr>r@rBr$rDrFr+rHr0rJr2rLr5r6r7r8r9r:r;�global_noter,r.)	�selfr>r@rBrDrFrHrJrLs	         r"�__init__zLinterStats.__init__Ws^��#�
�h��������������'
�'
�'
���2;��b���&,�l����.� 
�-��A��!�1�3
�3
�3
���2>�1C���� 0�!
�O� !�C�5
�5
�5
���%�
�	��a��!�)
�)
�)
���)�
�,=��a��!�-
�-
�-
��������
���
���	���
����������#$�� �(+��%�%�%r!�strc� �t|��S)N)rY�rWs r"�__repr__zLinterStats.__repr__�s���4�y�y�r!c�6�d�g|j��d�t|j�������d�t|j�������d�|j��d�t|j�������d�|j��d�|j	��d�|j
��d�|j��d�|j��d�|j
��d�|j��d�|j��d�|j��d�|j��d�|j��d�|j����S)N�z	
        )�joinr>�sortedr@�itemsrBrDrFrHrLr5r6r7r8r9r:r;rVr,r.r[s r"�__str__zLinterStats.__str__�s"��+�+�+�+�D�N�+�+�+�+�	���$�$�&�&�	'�	'�+�+�+�+�	���!�!�#�#�	$�	$�+�+�+�+�
�	�+�+�+�+�
��!�'�'�)�)�	*�	*�	+�+�+�+�

�	�+�+�+�+�
�	�
+�+�+�+�
��+�+�+�+�
��+�+�+�+�
��+�+�+�+�
��+�+�+�+�
��+�+�+�+�
��+�+�+�+�
��+�+�+�+�
�	�+�+�+�+�
�	!�+�+�+�+� 
�	&�!+�+�+�+�	+r!�module_namec	�B�tddddddd���|j|<dS)z`Use through PyLinter.set_current_module so PyLinter.current_name is
        consistent.
        r)r5r6r7r8r9r:r;N)r4r@)rWrcs  r"�init_single_modulezLinterStats.init_single_module�s5��'2�����Q�!�UV�'
�'
�'
���{�#�#�#r!�	node_name��Literal['argument', 'attr', 'class', 'class_attribute', 'class_const', 'const', 'inlinevar', 'function', 'method', 'module', 'variable', 'typevar', 'typealias']rc�z�|dkr|j�dd��S|j�|d��S)zGet a bad names node count.�classrr)r>�get�rWrfs  r"�
get_bad_nameszLinterStats.get_bad_names�s?��&�����>�%�%�g�q�1�1�1��~�!�!�)�Q�/�/�/r!�increasec���|dvrtd���ttd|��}|dkr|jdxx|z
cc<dS|j|xx|z
cc<dS)z Increase a bad names node count.>
rrirrrrr
rrrrrrz(Node type not part of the bad_names stat)
r
rrirrrrrrrrrrrirN)�
ValueErrorrrr>)rWrfrms   r"�increase_bad_namezLinterStats.increase_bad_name�s����
�
�
��G�H�H�H����
�
�!
�
�	�$�����N�7�#�#�#�x�/�#�#�#�#�#��N�9�%�%�%��1�%�%�%�%�%r!c�H�tddddddddddddd��
�
|_dS)zResets the bad_names attribute.rrQN)rr>r[s r"�reset_bad_nameszLinterStats.reset_bad_names�sC��!��������������
�
�
����r!�	type_name�9Literal['code', 'comment', 'docstring', 'empty', 'total']c�8�|j�|d��S)zGet a code type count.r)rDrj�rWrss  r"�get_code_countzLinterStats.get_code_count�s���#�'�'�	�1�5�5�5r!c�8�tddddd���|_dS)z%Resets the code_type_count attribute.rrRN)r$rDr[s r"�reset_code_countzLinterStats.reset_code_counts*��,��A��!�1� 
� 
� 
����r!c�2�tdd���|_dS)z&Resets the duplicated_lines attribute.rrSrTN)r+rHr[s r"�reset_duplicated_linesz"LinterStats.reset_duplicated_liness$�� /� !�C�!
�!
�!
����r!�0Literal['function', 'class', 'method', 'module']c�z�|dkr|j�dd��S|j�|d��S)z6Get a node count while handling some extra conditions.rirr)rJrjrks  r"�get_node_countzLinterStats.get_node_counts?�������?�&�&�w��2�2�2���"�"�9�a�0�0�0r!c�6�tdddd���|_dS)z Resets the node count attribute.rrUN)r0rJr[s r"�reset_node_countzLinterStats.reset_node_counts��#�Q�a��!�L�L�L����r!r-c�B�|dkr
|jdS|j|S)zGet a undocumented node count.rir)rLrks  r"�get_undocumentedzLinterStats.get_undocumenteds+�������$�W�-�-�� ��+�+r!c�6�tdddd���|_dS)z"Resets the undocumented attribute.rrUN)r2rLr[s r"�reset_undocumentedzLinterStats.reset_undocumented%s"��-�q��!�TU�V�V�V����r!c�$�t||d��S)zGet a global message count.r)�getattrrvs  r"�get_global_message_countz$LinterStats.get_global_message_count)s���t�Y��*�*�*r!�modnamec�:�t|j||d��S)zGet a module message count.r)r�r@)rWr�rss   r"�get_module_message_countz$LinterStats.get_module_message_count-s���t�~�g�.�	�1�=�=�=r!c�J�t||t||��|z��dS)z>Increase the message type count of an individual message type.N)�setattrr�)rWrsrms   r"�increase_single_message_countz)LinterStats.increase_single_message_count1s)����i���y�!9�!9�H�!D�E�E�E�E�Er!rc�<�|j||xx|z
cc<dS)z[Increase the message type count of an individual message type of a
        module.
        N)r@)rWr�rsrms    r"�$increase_single_module_message_countz0LinterStats.increase_single_module_message_count5s-��	
��w��	�*�*�*�h�6�*�*�*�*�*r!c�Z�d|_d|_d|_d|_d|_d|_dS)z2Resets the message type count of the stats object.rN)r5r6r7r8r9r;r[s r"�reset_message_countzLinterStats.reset_message_count=s0�������
���
���	���
�����r!)NNNNNNNN)r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrO)rNrY)rcrYrNrO)rfrgrNr)rfrYrmrrNrO)rNrO)rsrtrNr)rfr|rNr)rfr|rNr-)rsrYrNr)r�rYrsrYrNr)rsrYrmrrNrO)r�rYrsrrmrrNrO)rrrrrXr\rbrerlrprrrwryr{r~r�r�r�r�r�r�r�r�r r!r"r=r=Ts�������%�%�&*�37�(,�04�37�37�'+�15�5,�5,�5,�5,�5,�n����+�+�+�+�&
�
�
�
�0�0�0�0�.(2�(2�(2�(2�T
�
�
�
�$6�6�6�6�
�
�
�
�
�
�
�
�1�1�1�1�M�M�M�M�,�,�,�,�W�W�W�W�+�+�+�+�>�>�>�>�F�F�F�F�7�7�7�7������r!r=�stats�list[LinterStats]rNc�$
�t��}|D�]�}|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jd	xx|jd	z
cc<|jd
xx|jd
z
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jd
xx|jd
z
cc<|j���D]\}}||j|<�|j���D]5\}}	|j|xx|z
cc<�#t
$r
||j|<Y�2wxYw|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|j���D]@\}}	|j|�|���'#t
$r
||j|<Y�=wxYw|j	dxx|j	dz
cc<|j	dxx|j	dz
cc<|j
dxx|j
dz
cc<|j
dxx|j
dz
cc<|j
d	xx|j
d	z
cc<|j
d
xx|j
d
z
cc<|jdxx|jdz
cc<|jdxx|jdz
cc<|jd	xx|jd	z
cc<|jd
xx|jd
z
cc<|xj|jz
c_|xj
|j
z
c_
|xj|jz
c_|xj|jz
c_|xj|jz
c_|xj|jz
c_|xj|jz
c_|xj|jz
c_���|S)zaUsed to merge multiple stats objects into a new one when pylint is run in
    parallel mode.
    r
rrrrrrrrrrrrr%r&r'r(r)r,r.)r=r>r@rarB�KeyErrorrDrF�updaterHrJrLr5r6r7r8r9r:r;rV)	r��merged�stat�mod_key�	mod_value�msg_key�	msg_value�dep_key�	dep_values	         r"�merge_statsr�Gs'���]�]�F��=/�=/�����$�$�$���z�(B�B�$�$�$���� � � �D�N�6�$:�:� � � ����!�!�!�T�^�G�%<�<�!�!�!���*�+�+�+�t�~�>O�/P�P�+�+�+����'�'�'�4�>�-�+H�H�'�'�'����!�!�!�T�^�G�%<�<�!�!�!����%�%�%����)D�D�%�%�%����$�$�$���z�(B�B�$�$�$����"�"�"�d�n�X�&>�>�"�"�"����"�"�"�d�n�X�&>�>�"�"�"����$�$�$���z�(B�B�$�$�$����#�#�#�t�~�i�'@�@�#�#�#����%�%�%����)D�D�%�%�%�"&�.�"6�"6�"8�"8�	2�	2��G�Y�(1�F��W�%�%�"&�+�"3�"3�"5�"5�	3�	3��G�Y�
3��
�g�&�&�&�)�3�&�&�&�&���
3�
3�
3�)2��
�g�&�&�&�
3����	��v�&�&�&�$�*>�v�*F�F�&�&�&���y�)�)�)�T�-A�)�-L�L�)�)�)���{�+�+�+�t�/C�K�/P�P�+�+�+���w�'�'�'�4�+?��+H�H�'�'�'���w�'�'�'�4�+?��+H�H�'�'�'�"&�"3�"9�"9�";�";�	9�	9��G�Y�
9��#�G�,�3�3�I�>�>�>�>���
9�
9�
9�/8��#�G�,�,�,�
9����	�� 5�6�6�6�$�:O�!�;
�	
�6�6�6�	�� :�;�;�;�t�?T�&�@
�	
�;�;�;�	��*�%�%�%����)D�D�%�%�%���'�"�"�"�d�o�g�&>�>�"�"�"���(�#�#�#�t��x�'@�@�#�#�#���(�#�#�#�t��x�'@�@�#�#�#���J�'�'�'�4�+<�Z�+H�H�'�'�'���G�$�$�$��(9�'�(B�B�$�$�$���H�%�%�%��):�8�)D�D�%�%�%���H�%�%�%��):�8�)D�D�%�%�%����T�_�,�������
�"�������
�"������t�y� ������4�=�(������D�N�*������$�,�&������d�.�.�����Ms$�<H�H)�(H)�+ L�L#�"L#)r�r�rNr=)�
__future__r�sys�typingr�
pylint.typingr�version_inforr	�typing_extensionsrr$r+r0r2r4r=r�r r!r"�<module>r�s���
#�"�"�"�"�"�
�
�
�
�������.�.�.�.�.�.���v���)�)�)�)�)�)�)�)�)�4�4�4�4�4�4�4�4������y����$�����I����$�$�$�$�$�i�$�$�$������	���������	����	�	�	�	�	�)�	�	�	�p�p�p�p�p�p�p�p�fC�C�C�C�C�Cr!

Hacked By AnonymousFox1.0, Coded By AnonymousFox