관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋fs � �t � d dl Z d dlZd dlZd dlmZmZ d dlmZ dZd dl m Z g d�Zd� Z G d� d e� � Z dS ) � N)�Location�Message)�ToolBase)�PyrightTool)� BadToolConfig)�level�project�pythonplatform� pythonversion�skipunannotated� typeshed-path� venv-pathc �� � t j | � � }|� dg � � }g }|D ]�}|� di � � � di � � }t |d d d |� dd� � |� dd� � �� � }|� t d |� d d� � ||� dd� � � � � � � ��|S )N�generalDiagnostics�range�start�file�line���� character)�path�module�functionr r �pyright�rule� �message)�source�code�locationr )�json�loads�getr �appendr )�json_encoded�json_decoded�diagnostics�messages�diag�start_ranger s �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/prospector/tools/pyright/__init__.py�format_messagesr, s� � ��:�l�+�+�L��"�"�#7��<�<�K��H�� � ���h�h�w��+�+�/�/���<�<����f���������,�,�!�o�o�k�2�6�6� � � �� ����9�4�8�8�F�B�+?�+?�(�\`�\d�\d�en�pr�\s�\s�t�t�t� � � � � �O� c �* � � e Zd Z� fd�Zd� Zd� Z� xZS )r c �b �� t � � j |i |�� t | _ dg| _ d S )Nz--outputjson)�super�__init__r �checker�options)�self�args�kwargs� __class__s �r+ r1 zPyrightTool.__init__- s4 �� ������$�)�&�)�)�)����&�'����r- c �x � |� d� � }|� � � D ]#}|t vrd}t dd|� d|� �� � ��$|� dd � � }|� dd � � }|� dd � � }|� dd � � } |� d d � � } |� dd � � }|� dd � � }|r| j � d |g� � |r| j � d|g� � |r| j � d|g� � | r| j � d| g� � | r| j � d� � |r| j � d|g� � |r| j � d|g� � d S d S )Nr zThttps://github.com/PyCQA/prospector/blob/master/prospector/tools/pyright/__init__.pyzOption z1 is not valid. See the list of possible options: r r r r r Fr r z--levelz --projectz--pythonplatformz--pythonversionz--skipunannotatedz--typeshed-pathz--venv-path)�tool_options�keys� VALID_OPTIONSr r# r3 �extendr$ ) r4 �prospector_config�_r3 � option_key�urlr r r r r � typeshed_path� venv_paths r+ � configurezPyrightTool.configure2 s� � �#�0�0��;�;��!�,�,�.�.� � �J���.�.�l��#��o��o�o�jm�o�o�� � � /� ���G�T�*�*���+�+�i��.�.�� ���%5�t�<�<�����O�T�:�:� �!�+�+�&7��?�?�����O�T�:�:� ��K�K��T�2�2� �� 4��L����E� 2�3�3�3�� 8��L����g� 6�7�7�7�� F��L���!3�^� D�E�E�E�� D��L���!2�M� B�C�C�C�� 5��L��� 3�4�4�4�� D��L���!2�M� B�C�C�C�� <��L���� � :�;�;�;�;�;� <� <r- c �� � d� |j D � � }|� | j � � | j j |t j t j d��}t |j � � S )Nc �, � g | ]}t |� � ��S � )�str)�.0r s r+ � <listcomp>z#PyrightTool.run.<locals>.<listcomp>T s � �B�B�B�t��T���B�B�Br- )�stdout�stderr) �python_modulesr<