[Python-checkins] python/dist/src/Tools/scripts texcheck.py, 1.6, 1.7

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Aug 24 22:36:23 EDT 2003


Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv31078

Modified Files:
	texcheck.py 
Log Message:
Added doubled word warnings.

Index: texcheck.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/texcheck.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** texcheck.py	16 May 2003 03:06:39 -0000	1.6
--- texcheck.py	25 Aug 2003 04:36:21 -0000	1.7
***************
*** 99,102 ****
--- 99,103 ----
      delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])')
      braces = re.compile(r'({)|(})')
+     doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b')
  
      openers = []                            # Stack of pending open delimiters
***************
*** 176,179 ****
--- 177,182 ----
              print r'Style warning, avoid use of i.e or e.g. on line %d' % (lineno,)
  
+         for dw in doubledwords.findall(line):
+             print r'Doubled word warning.  "%s" on line %d' % (dw, lineno)
  
      lastline = lineno





More information about the Python-checkins mailing list