AlkantarClanX12
Current Path : /lib64/python3.6/lib2to3/__pycache__/ |
Current File : //lib64/python3.6/lib2to3/__pycache__/fixer_base.cpython-36.opt-2.pyc |
3 \" � @ 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 ZdZdZdZdZdZej d�Z e� ZdZ dZdZdZdZdZejZdd� Zdd � Zd d� Zdd � Zdd� Zddd�Zdd� Zddd�Zdd� Zdd� Zdd� Z dS )�BaseFixNr ZpostF� c C s || _ || _| j� d S )N)�options�log�compile_pattern)�selfr r � r �*/usr/lib64/python3.6/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 �PCr 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 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 j|� |S )N)� used_names�str�next�numbers�add)r �template�namer r r �new_namei s zBaseFix.new_namec C s. | j rd| _ | jjd| j � | jj|� d S )NFz### In file %s ###)� first_logr �appendr )r �messager r r �log_messaget s zBaseFix.log_messagec C s>