//usr/lib64/lib64//lib64/lib64//ó
ÛœSec @ 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 d e f d „ ƒ YZ
d e
f d
„ ƒ YZ d S( s2 Base class for fixers (optional, but recommended).iÿÿÿÿNi ( t PatternCompiler( t pygram( t does_tree_importt BaseFixc B 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 e Z d Z d Z e Z e Z e j Z d „ Z d „ Z d „ Z d „ Z d „ Z d d
„ Z d „ Z d d „ Z d
„ Z! d „ Z" d „ Z# RS( s 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 t posti c C s | | _ | | _ | j ƒ d S( s 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( t optionst logt compile_pattern( t selfR R ( ( s* /usr/lib64/python2.7/lib2to3/fixer_base.pyt __init__1 s c C sC | j d k r? t ƒ } | j | j d t ƒ\ | _ | _ n d S( s– Compiles self.PATTERN into self.pattern.
Subclass may override if it doesn't want to use
self.{pattern,PATTERN} in .match().
t with_treeN( t PATTERNt NoneR R t Truet patternt pattern_tree( R t PC( ( s* /usr/lib64/python2.7/lib2to3/fixer_base.pyR = s c C s | | _ t j | ƒ | _ d S( sm Set the filename, and a logger derived from it.
The main refactoring tool should call this.
N( t filenamet loggingt getLoggert logger( R R ( ( s* /usr/lib64/python2.7/lib2to3/fixer_base.pyt set_filenameH s c C s&