관리-도구
편집 파일: raw_metrics.cpython-311.pyc
� �܋f< � � � d dl mZ d dlZd dlZd dlmZmZmZ d dlm Z d dl mZmZm Z mZ d dlmZmZ ej dk rd dlmZ nd dlmZ erd d lmZ dd�Z G d� de � � Zej ej ej ej fZdd�Zd d�ZdS )!� )�annotationsN)� TYPE_CHECKING�Any�cast)�BaseTokenChecker)� Paragraph�Section�Table�Text)�LinterStats�diff_string)� � )�Literal)�PyLinter�sectr �statsr � old_stats�LinterStats | None�return�Nonec � � |j d }| � dt t |� d�� � g� � � � g d�}dD ]�}t t d |� � }|j | }|rt |dz � � |z nd}|r |j | nd}|rt ||� � nd} ||t |� � |�|d�nd |rt |� � nd | r| nd gz }��| � t |d d�� � � � dS ) z5Calculate percentage of code / doc / comment / empty.�totalr z lines have been analyzed )�type�number�%�previous� difference)�code� docstring�comment�empty�d Nz.2f�NC� � )�children�cols�rheaders)�code_type_count�insertr r r r �floatr �str�appendr ) r r r �total_lines�lines� node_typer �percent�old�diff_strs �l/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/checkers/raw_metrics.py�report_raw_statsr6 sD � � �'��0�K��K�K��9�d�k�#N�#N�#N�O�O�P�Q�Q�R�R�R�=�=�=�E�>� � � ���!H�I�9�U�U� ��%�i�0��6A�K�%����$�$�{�2�2�t��6?�I�i�'� �2�2�T��.1�;�;�s�E�*�*�*�t�� ����J�J� '� 3�w������%�C��H�H�H�� �*�H�H�d� � ��� �K�K��u�1�q�9�9�9�:�:�:�:�:� c �F � e Zd ZU dZdZdZi Zded<