관리-도구
편집 파일: format.cpython-311.pyc
� �܋fk � � � d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZm Z d dl Z dZn # e$ r dZY nw xY w e j d� � Z e j d � � Zd edefd�Zd edefd �Zddd�dededee dee deddfd�Zdedefd�Zd#dededefd�Z G d� d� � Z G d� de� � Z d$dedee d ed!edef d"�ZdS )%� N)�datetime)�unified_diff)�Path)�Optional�TextIOFTz\+[^+]z-[^-]�import_line�returnc � � | � � � } | � d� � r-| � dd� � } | � dd� � } n+| � d� � r| � dd� � } | S )N�from � � import �.�import )�strip� startswith�replace)r s �]/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/isort/format.py�format_simplifiedr s� � ��#�#�%�%�K����g�&�&� 9�!�)�)�'�2�6�6��!�)�)�*�c�:�:��� � � � � *� *� 9�!�)�)�)�R�8�8���� c � � | � � � } | � d� � sc| � d� � sNd| vrd| � �S | � d� � }|� d� � }dd� |� � � d|� �S | S )Nr r r ���r )r r �split�pop�join)r �parts�ends r �format_naturalr s� � ��#�#�%�%�K��!�!�'�*�*� 6�;�3I�3I�)�3T�3T� 6��k�!�!�*�[�*�*�*��!�!�#�&�&���i�i��m�m��5�s�x�x����5�5��5�5�5��r )�output�color_output� file_input�file_output� file_pathr r c �� � t ||� � }|�dnt |� � }t |�t j � � n*t j |� � � j � � � � }t | � d�� � |� d�� � |dz |dz |t t j � � � � �� � }|D ]} |� | � � �dS )a� Shows a unified_diff for the provided input and output against the provided file path. - **file_input**: A string that represents the contents of a file before changes. - **file_output**: A string that represents the contents of a file after changes. - **file_path**: A Path object that represents the file path of the file being changed. - **output**: A stream to output the diff to. If non is provided uses sys.stdout. - **color_output**: Use color in output if True. Nr T)�keependsz:beforez:after)�fromfile�tofile�fromfiledate� tofiledate) �create_terminal_printer�strr �now� fromtimestamp�stat�st_mtimer � splitlines� diff_line) r r! r"