관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋fg � �j � d dl Z d dlmZ d dlmZmZ d dlmZmZm Z d dl mZ dZ G d� de� � Z dS ) � N)�PathGraphingAstVisitor)�CouldNotHandleEncoding�read_py_file)�Location�Message�make_tool_error_message)�ToolBase)� McCabeToolc �0 � � e Zd Z� fd�Zd� Zd� Zd� Z� xZS )r c �V �� t � � j |i |�� d| _ d| _ d S )N� � )�super�__init__�ignore_codes�max_complexity)�self�args�kwargs� __class__s ��q/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/prospector/tools/mccabe/__init__.pyr zMcCabeTool.__init__ s5 �� ������$�)�&�)�)�)���� ����� c � � |� d� � | _ |� d� � }d|v r|d | _ d S d S )N�mccabezmax-complexity)�get_disabled_messagesr �tool_optionsr )r �prospector_config�_�optionss r � configurezMcCabeTool.configure sR � �-�C�C�H�M�M���#�0�0��:�:���w�&�&�")�*:�";�D���� '�&r c �j � g }|j D �]�} t |� � }t j ||�� � }n�# t $ r8}|� t |ddd|j � ��� � � � Y d }~�gd }~wt $ r<}|� t |dd|j |j d�� � � � Y d }~��d }~wt $ r) |� t |ddd�� � � � Y ��w xY wt � � }|� ||� � |j � � � D ]r}|� � � } | | j k rQt% |d |j |j d � � � } t) dd| |j � d| � d ��� � }|� |� � �s���| � |� � S )N)�filenamer �MC0000z,Could not handle the encoding of this file: )�messagezSyntax Error)�line� characterr$ zUnable to parse filer )�path�module�functionr% r&