Closes #12536: Unused logger removed from lib2to3.

This commit is contained in:
Vinay Sajip 2011-07-13 23:15:07 +01:00
parent 07b353716c
commit bf9c021ddd
1 changed files with 1 additions and 3 deletions

View File

@ -27,7 +27,6 @@ class BaseFix(object):
pattern_tree = None # Tree representation of the pattern
options = None # Options object passed to initializer
filename = None # The filename (set by set_filename)
logger = None # A logger (set by set_filename)
numbers = itertools.count(1) # For new_name()
used_names = set() # A set of all used NAMEs
order = "post" # Does the fixer prefer pre- or post-order traversal
@ -70,12 +69,11 @@ def compile_pattern(self):
with_tree=True)
def set_filename(self, filename):
"""Set the filename, and a logger derived from it.
"""Set the filename.
The main refactoring tool should call this.
"""
self.filename = filename
self.logger = logging.getLogger(filename)
def match(self, node):
"""Returns match for a given parse tree node.