Ź˙f2 c @ 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( u2 Base class for fixers (optional, but recommended).i Ni ( u PatternCompiler( u pygram( u does_tree_importc B s | Ee 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( u BaseFixu 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. i u posti c C s | | _ | | _ | j d S( u 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( u optionsu logu compile_pattern( u selfu optionsu log( ( u7 /opt/alt/python33/lib64/python3.3/lib2to3/fixer_base.pyu __init__0 s u BaseFix.__init__c C sC | j d k r? t } | j | j d d \ | _ | _ n d S( u Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match(). u with_treeNT( u PATTERNu Noneu PatternCompileru compile_patternu Trueu patternu pattern_tree( u selfu PC( ( u7 /opt/alt/python33/lib64/python3.3/lib2to3/fixer_base.pyu compile_pattern<