Your IP : 18.118.33.130
�
c��fN. � � � d dl mZmZ d dlZd dlZd dlZd dlZd dlZd dlZddl m
Z
d� Z G d� de
j � � Z
d� Zd
d �ZdS )� )�with_statement�print_functionN� )�refactorc � � | � � � } |� � � }t j | |||ddd�� � S )Nz
(original)z(refactored)� )�lineterm)�
splitlines�difflib�unified_diff)�a�b�filenames �3/opt/alt/python311/lib64/python3.11/lib2to3/main.py�
diff_textsr sI � �/� �����A� �����A����1�h�� ,�n�)+�-� -� -� -� c �: � � e Zd Z d� fd� Zd� Z� fd�Zd� Z� xZS )�StdoutRefactoringToolr c � �� || _ || _ |r.|� t j � � s|t j z
}|| _ || _ || _ t t | � � �
|||� � d S �N)� nobackups�
show_diffs�endswith�os�sep�_input_base_dir�_output_dir�_append_suffix�superr �__init__)
�self�fixers�options�explicitr r �input_base_dir�
output_dir�
append_suffix� __class__s
�r r zStdoutRefactoringTool.__init__$ s� �� � �$ #���$���� %�.�"9�"9�"�&�"A�"A� %��b�f�$�N�-���%���+���
�#�T�*�*�3�3�F�G�X�N�N�N�N�Nr c �l � | j � |||f� � | j j |g|�R i |�� d S r )�errors�append�logger�error)r! �msg�args�kwargss r � log_errorzStdoutRefactoringTool.log_errorA sJ � �����C��v�.�/�/�/�����#�/��/�/�/��/�/�/�/�/r c � �� |}| j rt|� | j � � r@t j � | j |t
| j � � d � � � }nt d|�d| j ��� � �| j r
|| j z
}||k rkt j � |� � }t j �
|� � s|rt j |� � | � d||� � | j
s�|dz }t j � |� � r< t j |� � n&# t $ r | � d|� � Y nw xY w t j ||� � n'# t $ r | � d||� � Y nw xY wt% t&