Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(52)

Unified Diff: Lib/lib2to3/fixer_base.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/inspect.py ('k') | Lib/logging/handlers.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/lib2to3/fixer_base.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/lib2to3/fixer_base.py Mon Jul 25 09:47:18 2011 -0400
@@ -27,6 +27,7 @@
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
@@ -69,11 +70,12 @@
with_tree=True)
def set_filename(self, filename):
- """Set the filename.
+ """Set the filename, and a logger derived from it.
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.
« no previous file with comments | « Lib/inspect.py ('k') | Lib/logging/handlers.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+