[Happydoc-checkins] CVS: HappyDoc3/happydoclib scanner.py,1.2,1.3
Brought to you by:
doughellmann,
krlosaqp
From: Doug H. <dou...@us...> - 2002-11-17 15:15:20
|
Update of /cvsroot/happydoc/HappyDoc3/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv6772/happydoclib Modified Files: scanner.py Log Message: Use regular expressions to look for files to ignore. Index: scanner.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc3/happydoclib/scanner.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scanner.py 17 Nov 2002 15:01:50 -0000 1.2 --- scanner.py 17 Nov 2002 15:15:17 -0000 1.3 *************** *** 60,63 **** --- 60,64 ---- import glob import os + import re import UserDict *************** *** 142,148 **** """ ! def __init__(self, inputDirectories, ignoreNames=[]): ! self._ignore_names = ignoreNames self._package_trees = [] --- 143,150 ---- """ ! def __init__(self, inputDirectories, ignorePatterns=[]): ! self._ignore_patterns = ignorePatterns ! self._ignore_res = [ re.compile(ip) for ip in ignorePatterns ] self._package_trees = [] *************** *** 175,181 **** # Make sure we are not ignoring this name # ! if package_tree_name in self._ignore_names: ! trace.outof() ! return None # --- 177,185 ---- # Make sure we are not ignoring this name # ! #if package_tree_name in self._ignore_names: ! for ignore_re in self._ignore_res: ! if ignore_re.match(package_tree_name): ! trace.outof() ! return None # |