[Checkins] SVN: zope.fixers/trunk/zope/fixers/fix_implements.py The dynamic patterns should be compiled on a tree by tree basis.
Lennart Regebro
regebro at gmail.com
Mon Apr 6 13:36:03 EDT 2009
Log message for revision 98948:
The dynamic patterns should be compiled on a tree by tree basis.
Changed:
U zope.fixers/trunk/zope/fixers/fix_implements.py
-=-
Modified: zope.fixers/trunk/zope/fixers/fix_implements.py
===================================================================
--- zope.fixers/trunk/zope/fixers/fix_implements.py 2009-04-06 17:31:40 UTC (rev 98947)
+++ zope.fixers/trunk/zope/fixers/fix_implements.py 2009-04-06 17:36:03 UTC (rev 98948)
@@ -55,9 +55,13 @@
return not ('zope' in module and 'interface' in module)
def compile_pattern(self):
- # Compile the import pattern:
+ # Compile the import pattern.
self.named_import_pattern = PatternCompiler().compile_pattern(self.IMPORT_PATTERN)
- # Compile the basic class/implements matches:
+
+ def start_tree(self, tree, filename):
+ # Compile the basic class/implements matches. This is done per tree,
+ # as further matches (based on what imports there are) also are done
+ # per tree.
self.class_patterns = []
self.implements_patterns = []
self._add_pattern("'implements'")
More information about the Checkins
mailing list