Server: appserver-7f0f8755-nginx-15961cad18524ec5a9db05f2a6a7e440
Current directory: /usr/lib/python2.7/lib2to3
Software: nginx/1.27.5
Shell Command
Create a new file
Upload file
File: fixer_base.pyc
� ӫ[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 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: a 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/lib/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/lib/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/lib/python2.7/lib2to3/fixer_base.pyt set_filenameH s c C s&