Hacked By AnonymousFox
B
YI~d" � @ sP d dl Z ddlmZ ddlmZ ddlmZ G dd� de�ZG dd � d e�Z dS )
� N� )�PatternCompiler)�pygram)�does_tree_importc @ s� e Zd ZdZdZdZdZdZe� d�Z
e� ZdZ
dZdZdZdZdZejZdd� Zdd � Zd
d� Zdd
� Zdd� Zddd�Zdd� Zddd�Zdd� Zdd� Zdd� Z dS )�BaseFixNr ZpostF� c C s || _ || _| �� d S )N)�options�log�compile_pattern)�selfr r � r �7/opt/alt/python37/lib64/python3.7/lib2to3/fixer_base.py�__init__/ s zBaseFix.__init__c C s, | j d k r(t� }|j| j dd�\| _| _d S )NT)Z with_tree)�PATTERNr r
�pattern�pattern_tree)r ZPCr r r
r
; s
zBaseFix.compile_patternc C s
|| _ d S )N)�filename)r r r r r
�set_filenameF s zBaseFix.set_filenamec C s d|i}| j �||�o|S )N�node)r �match)r r �resultsr r r
r M s z
BaseFix.matchc C s
t � �d S )N)�NotImplementedError)r r r r r r
� transformY s zBaseFix.transform�xxx_todo_changemec C s6 |}x || j kr$|tt| j�� }qW | j �|� |S )N)�
used_names�str�next�numbers�add)r �template�namer r r
�new_namei s
zBaseFix.new_namec C s. | j rd| _ | j�d| j � | j�|� d S )NFz### In file %s ###)� first_logr �appendr )r �messager r r
�log_messaget s zBaseFix.log_messagec C s>