diff options
author | Georg Brandl <georg@python.org> | 2009-01-03 21:30:40 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-03 21:30:40 (GMT) |
commit | d509788f98e5ee6ecc638daf3be27493ae74640a (patch) | |
tree | dafaad68f4f0bb785553898cc79957ca09781ddd /Doc | |
parent | a1c6a1cea5af1d3c7682a8e99b001b0904480e4d (diff) | |
download | cpython-d509788f98e5ee6ecc638daf3be27493ae74640a.zip cpython-d509788f98e5ee6ecc638daf3be27493ae74640a.tar.gz cpython-d509788f98e5ee6ecc638daf3be27493ae74640a.tar.bz2 |
Merged revisions 68222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68222 | georg.brandl | 2009-01-03 22:11:58 +0100 (Sat, 03 Jan 2009) | 2 lines
Disable the line length checker by default.
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Makefile | 2 | ||||
-rwxr-xr-x | Doc/tools/rstlint.py | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Doc/Makefile b/Doc/Makefile index e41f873..4ef79f4 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -142,4 +142,4 @@ dist: 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 diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py index b5cde92..8fd02a9 100755 --- a/Doc/tools/rstlint.py +++ b/Doc/tools/rstlint.py @@ -91,7 +91,6 @@ def check_suspicious_constructs(fn, lines): @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 @@ def check_whitespace(fn, lines): yield lno+1, 'OMG TABS!!!1' if line[:-1].rstrip(' \t') != line[:-1]: yield lno+1, 'trailing whitespace' - if len(line) > 86: + + +@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 \ |