diff mercurial/help.py @ 10282:08a0f04b56bd

many, many trivial check-code fixups
author Matt Mackall <mpm@selenic.com>
date Mon, 25 Jan 2010 00:05:27 -0600
parents 25e572394f5c
children de1e7099d100
line wrap: on
line diff
--- a/mercurial/help.py	Mon Jan 25 00:05:22 2010 -0600
+++ b/mercurial/help.py	Mon Jan 25 00:05:27 2010 -0600
@@ -13,17 +13,19 @@
 def moduledoc(file):
     '''return the top-level python documentation for the given file
 
-    Loosely inspired by pydoc.source_synopsis(), but rewritten to handle \'''
-    as well as """ and to return the whole text instead of just the synopsis'''
+    Loosely inspired by pydoc.source_synopsis(), but rewritten to
+    handle triple quotes and to return the whole text instead of just
+    the synopsis'''
     result = []
 
     line = file.readline()
     while line[:1] == '#' or not line.strip():
         line = file.readline()
-        if not line: break
+        if not line:
+            break
 
     start = line[:3]
-    if start == '"""' or start == "'''":
+    if start == '\"\"\"' or start == "\'\'\'":
         line = line[3:]
         while line:
             if line.rstrip().endswith(start):
@@ -83,11 +85,15 @@
     (["config"], _("Configuration Files"), loaddoc('config')),
     (["dates"], _("Date Formats"), loaddoc('dates')),
     (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
-    (['environment', 'env'], _('Environment Variables'), loaddoc('environment')),
-    (['revs', 'revisions'], _('Specifying Single Revisions'), loaddoc('revisions')),
-    (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), loaddoc('multirevs')),
+    (['environment', 'env'], _('Environment Variables'),
+     loaddoc('environment')),
+    (['revs', 'revisions'], _('Specifying Single Revisions'),
+     loaddoc('revisions')),
+    (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'),
+     loaddoc('multirevs')),
     (['diffs'], _('Diff Formats'), loaddoc('diffs')),
-    (['templating', 'templates'], _('Template Usage'), loaddoc('templates')),
+    (['templating', 'templates'], _('Template Usage'),
+     loaddoc('templates')),
     (['urls'], _('URL Paths'), loaddoc('urls')),
     (["extensions"], _("Using additional features"), extshelp),
 )