AlkantarClanX12
Current Path : /opt/alt/python34/lib64/python3.4/lib2to3/__pycache__/ |
Current File : //opt/alt/python34/lib64/python3.4/lib2to3/__pycache__/fixer_base.cpython-34.pyo |
� j f2 � @ s~ d Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z Gd d � d e � Z Gd d � d e � Z d S)z2Base class for fixers (optional, but recommended).� N� )�PatternCompiler)�pygram)�does_tree_importc @ s e Z d Z d Z d Z d Z d Z d Z d Z e j d � Z e � Z d Z d Z d Z d Z d Z d Z e j Z d d � Z d d � Z d d � Z d d � Z d d � Z d d d � Z d d � Z d d d � Z d d � Z d d � Z d d � Z! d S)�BaseFixa Optional base class for fixers. The subclass name must be FixFooBar where FooBar is the result of removing underscores and capitalizing the words of the fix name. For example, the class name for a fixer named 'has_key' should be FixHasKey. Nr ZpostF� c C s | | _ | | _ | j � d S)a Initializer. Subclass may override. Args: options: an dict containing the options passed to RefactoringTool that could be used to customize the fixer through the command line. log: a list to append warnings and other messages to. N)�options�log�compile_pattern)�selfr r � r �7/opt/alt/python34/lib64/python3.4/lib2to3/fixer_base.py�__init__0 s zBaseFix.__init__c C sC | j d k r? t � } | j | j d d �\ | _ | _ n d S)z�Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match(). NZ with_treeT)�PATTERNr r �pattern�pattern_tree)r �PCr r r r <