Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d509788

Browse files
committed
Merged revisions 68222 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent a1c6a1c commit d509788

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ dist:
142142
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2
143143

144144
check:
145-
$(PYTHON) tools/rstlint.py -i tools -s 2
145+
$(PYTHON) tools/rstlint.py -i tools

Doc/tools/rstlint.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,20 @@ def check_suspicious_constructs(fn, lines):
9191
@checker('.py', '.rst')
9292
def check_whitespace(fn, lines):
9393
"""Check for whitespace and line length issues."""
94-
lasti = 0
9594
for lno, line in enumerate(lines):
9695
if '\r' in line:
9796
yield lno+1, '\\r in line'
9897
if '\t' in line:
9998
yield lno+1, 'OMG TABS!!!1'
10099
if line[:-1].rstrip(' \t') != line[:-1]:
101100
yield lno+1, 'trailing whitespace'
102-
if len(line) > 86:
101+
102+
103+
@checker('.rst', severity=0)
104+
def check_line_length(fn, lines):
105+
"""Check for line length; this checker is not run by default."""
106+
for lno, line in enumerate(lines):
107+
if len(line) > 81:
103108
# don't complain about tables, links and function signatures
104109
if line.lstrip()[0] not in '+|' and \
105110
'http://' not in line and \

0 commit comments

Comments
 (0)