관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋f � �� � d Z ddlmZ ddlZddlmZ ddlmZmZm Z ddl mZ ddlm Z ddlmZmZmZ ej d k rdd lmZ ndd lmZ erddlmZ dd�Zdd�Zg d�ZdS )aO Utilities methods and classes for checkers. Base id of standard checkers (used in msg and report ids): 01: base 02: classes 03: format 04: import 05: misc 06: variables 07: exceptions 08: similar 09: design_analysis 10: newstyle 11: typecheck 12: logging 13: string_format 14: string_constant 15: stdlib 16: python3 (This one was deleted but needs to be reserved for consistency with old messages) 17: refactoring . . . 24: non-ascii-names 25: unicode 26: unsupported_version 27: private-import 28-50: not yet used: reserved for future internal checkers. This file is not updated. Use script/get_unused_message_id_category.py to get the next free checker id. 51-99: perhaps used: reserved for external checkers The raw_metrics checker has no number associated since it doesn't emit any messages nor reports. XXX not true, emit a 07 report ! � )�annotationsN)� TYPE_CHECKING)�BaseChecker�BaseRawFileChecker�BaseTokenChecker)�DeprecatedMixin)�MapReduceMixin)�LinterStats�diff_string�register_plugins)� � )�Literal)�PyLinter�statsr � old_stats�LinterStats | None� stat_type�,Literal['duplicated_lines', 'message_types']�return� list[str]c �� � g }|dk rDd| j d fd| j d fg}|rd|j d fd|j d fg}nVddg}nQ|dk rKd| j fd| j fd | j fd | j fg}|r#d|j fd|j fd |j fd |j fg}ng d�}t |� � D ]�\ }}|d }|| d } t | t � � rt | |� � n| } t |t � � r|d �nt |� � }t | t � � r| d �nt | � � }|� |d � dd� � ||| f� � ��|S )z�Get values listed in <columns> from <stats> and <old_stats>, and return a formatted list of values. The return value is designed to be given to a ureport.Table object �duplicated_lines�nb_duplicated_lines�percent_duplicated_lines)r �NC)r r � message_types� convention�refactor�warning�error))r r )r r )r r )r! r � z.3fr �_� )r r r r r! � enumerate� isinstance�floatr �str�extend�replace) r r r �lines�new�old�index�value� new_value� old_value�diff_str�new_str�old_strs �i/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/checkers/__init__.py�table_lines_from_statsr6 B s� � � �E��&�&�&� "�E�$:�;P�$Q�R�*��&�'A�B� �. �� � V� *��.�/D�E�� /��.�/I�J�� 8�C�C� 1�2T�U�C�C� �o� %� %� �5�+�,� ���(� �� �&� �e�k�"� �� � ��y�3�4��Y�/�0��I�-�.��)�/�*� �C�C�� � �C� "�#��� O� O���u��!�H� ���J�q�M� � �)�U�+�+� �K� �9�-�-�-�� � )3�9�e�(D�(D�X�Y�$�$�$�#�i�.�.��(2�9�e�(D�(D�X�Y�$�$�$�#�i�.�.�� ���e�A�h�&�&�s�C�0�0�'�7�H�M�N�N�N�N��L� �linterr �Nonec �<