관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋f� � � � d dl Z d dlmZ d dlmZ d dlmZmZ d dlm Z d dl mZmZ d dl mZ defd �Z G d � de� � ZdS )� N)�Path)�check_file_contents)�CouldNotHandleEncoding�read_py_file)� FileFinder)�Location�Message)�ToolBase�pathc �X � d� | j dd� | j fz � � S )N�.� ���)�join�parts�stem)r s �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/prospector/tools/dodgy/__init__.py�module_from_pathr s( � ��8�8�D�J�q��t�$�� �|�3�4�4�4� c � � e Zd Zd� Zdefd�ZdS )� DodgyToolc � � d S )N� )�self�prospector_config�found_filess r � configurezDodgyTool.configure s � ��r r c �N � g }|j D ]�}t j t |� � � � � � � }|d �#|d � d� � r|d ��a t |� � }n# t $ r Y �~w xY wt |� � D ] \ }}}|� ||||d�� � �!��g } |D ]c} | d }t |t |� � d| d d� � }t d| d || d � � } | � | � � �d| S )Nr ztext/r )�line�code�messager r � r �dodgyr r! ) �files� mimetypes� guess_type�str�absolute� startswithr r r �appendr r r )r r �warnings�filepath�mimetype�contentsr r r! �messages�warningr �loc�msgs r �runz DodgyTool.run s` � ���#�)� d� d�H� �+�C��0A�0A�0C�0C�,D�,D�E�E�H���{�"�(�1�+�*@�*@��*I�*I�"�X�VW�[�Md�� �'��1�1����)� � � ��� ����':�8�'D�'D� d� d�#��d�G�����t��Ya� b� b�c�c�c�c� d� ��� !� !�G��6�?�D��4�!1�$�!7�!7��W�V�_�a�P�P�C��'�7�6�?�C���9K�L�L�C��O�O�C� � � � ��s �,A<�< B �B N)�__name__� __module__�__qualname__r r r3 r r r r r s>