summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-10 22:18:18 +0100
committerGeorg Brandl <georg@python.org>2009-01-10 22:18:18 +0100
commit6d564844e830c1faaf746460327bd14f3234171e (patch)
tree5044c2146ca4b1756136040d0b4365685b0c4f84 /utils
parentac92e5497ec6704b661ca3e7539ce2799fda2ef4 (diff)
downloadsphinx-6d564844e830c1faaf746460327bd14f3234171e.tar.gz
Fix more line length and trailing whitespace.
Diffstat (limited to 'utils')
-rwxr-xr-xutils/check_sources.py6
-rwxr-xr-xutils/reindent.py6
2 files changed, 7 insertions, 5 deletions
diff --git a/utils/check_sources.py b/utils/check_sources.py
index def13ee9..8a115c71 100755
--- a/utils/check_sources.py
+++ b/utils/check_sources.py
@@ -30,7 +30,7 @@ def checker(*suffixes, **kwds):
name_mail_re = r'[\w ]+(<.*?>)?'
-copyright_re = re.compile(r'^ :copyright: Copyright 200\d(-200\d)?'
+copyright_re = re.compile(r'^ :copyright: Copyright 200\d(-200\d)? '
r'by %s(, %s)*[,.]$' %
(name_mail_re, name_mail_re))
license_re = re.compile(r" :license: (.*?).\n")
@@ -142,7 +142,7 @@ def check_fileheader(fn, lines):
yield 0, "no correct copyright info"
-@checker('.py', '.html')
+@checker('.py', '.html', '.rst')
def check_whitespace_and_spelling(fn, lines):
for lno, line in enumerate(lines):
if "\t" in line:
@@ -154,7 +154,7 @@ def check_whitespace_and_spelling(fn, lines):
yield lno+1, '"%s" used' % word
-bad_tags = ('<b>', '<i>', '<u>', '<s>', '<strike>'
+bad_tags = ('<u>', '<s>', '<strike>'
'<center>', '<big>', '<small>', '<font')
@checker('.html')
diff --git a/utils/reindent.py b/utils/reindent.py
index e6ee8287..c499f671 100755
--- a/utils/reindent.py
+++ b/utils/reindent.py
@@ -8,7 +8,8 @@
-d (--dryrun) Dry run. Analyze, but don't make any changes to files.
-r (--recurse) Recurse. Search for all .py files in subdirectories too.
-B (--no-backup) Don't write .bak backup files.
--v (--verbose) Verbose. Print informative msgs; else only names of changed files.
+-v (--verbose) Verbose. Print informative msgs; else only names of \
+changed files.
-h (--help) Help. Print this usage information and exit.
Change Python (.py) files to use 4-space indents and no hard tab characters.
@@ -118,7 +119,8 @@ def check(file):
if dryrun:
print "But this is a dry run, so leaving it alone."
else:
- print "reindented", file, (dryrun and "(dry run => not really)" or "")
+ print "reindented", file, \
+ (dryrun and "(dry run => not really)" or "")
if not dryrun:
if not no_backup:
bak = file + ".bak"