[Python-checkins] r68222 - in python/trunk/Doc: Makefile tools/rstlint.py

georg.brandl python-checkins at python.org
Sat Jan 3 22:11:59 CET 2009


Author: georg.brandl
Date: Sat Jan 3 22:11:58 2009
New Revision: 68222
Log:
Disable the line length checker by default.
Modified:
 python/trunk/Doc/Makefile
 python/trunk/Doc/tools/rstlint.py
Modified: python/trunk/Doc/Makefile
==============================================================================
--- python/trunk/Doc/Makefile	(original)
+++ python/trunk/Doc/Makefile	Sat Jan 3 22:11:58 2009
@@ -142,4 +142,4 @@
 	cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2
 
 check:
-	$(PYTHON) tools/rstlint.py -i tools -s 2
+	$(PYTHON) tools/rstlint.py -i tools
Modified: python/trunk/Doc/tools/rstlint.py
==============================================================================
--- python/trunk/Doc/tools/rstlint.py	(original)
+++ python/trunk/Doc/tools/rstlint.py	Sat Jan 3 22:11:58 2009
@@ -91,7 +91,6 @@
 @checker('.py', '.rst')
 def check_whitespace(fn, lines):
 """Check for whitespace and line length issues."""
- lasti = 0
 for lno, line in enumerate(lines):
 if '\r' in line:
 yield lno+1, '\\r in line'
@@ -99,7 +98,13 @@
 yield lno+1, 'OMG TABS!!!1'
 if line[:-1].rstrip(' \t') != line[:-1]:
 yield lno+1, 'trailing whitespace'
- if len(line) > 86:
+
+
+ at checker('.rst', severity=0)
+def check_line_length(fn, lines):
+ """Check for line length; this checker is not run by default."""
+ for lno, line in enumerate(lines):
+ if len(line) > 81:
 # don't complain about tables, links and function signatures
 if line.lstrip()[0] not in '+|' and \
 'http://' not in line and \


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /