diff options
author | Georg Brandl <georg@python.org> | 2009-01-10 21:23:39 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-10 21:23:39 +0100 |
commit | b068e9180365a5d74d4fb02b003d7a05f99ffac3 (patch) | |
tree | c092aa25daf519398c0d6cc84f85a568cf26440e /sphinx/builders/htmlhelp.py | |
parent | d0e0acaaa1278627d70f7bbb7d823c79d3546b58 (diff) | |
download | sphinx-git-b068e9180365a5d74d4fb02b003d7a05f99ffac3.tar.gz |
Reformat to EOL80.
Diffstat (limited to 'sphinx/builders/htmlhelp.py')
-rw-r--r-- | sphinx/builders/htmlhelp.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py index 9baaa2356..8d17f91b8 100644 --- a/sphinx/builders/htmlhelp.py +++ b/sphinx/builders/htmlhelp.py @@ -122,8 +122,8 @@ was will with class HTMLHelpBuilder(StandaloneHTMLBuilder): """ - Builder that also outputs Windows HTML help project, contents and index files. - Adapted from the original Doc/tools/prechm.py. + Builder that also outputs Windows HTML help project, contents and + index files. Adapted from the original Doc/tools/prechm.py. """ name = 'htmlhelp' @@ -166,8 +166,10 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): for root, dirs, files in os.walk(outdir): staticdir = (root == path.join(outdir, '_static')) for fn in files: - if (staticdir and not fn.endswith('.js')) or fn.endswith('.html'): - print >>f, path.join(root, fn)[olen:].replace(os.sep, '\\') + if (staticdir and not fn.endswith('.js')) or \ + fn.endswith('.html'): + print >>f, path.join(root, fn)[olen:].replace(os.sep, + '\\') finally: f.close() @@ -182,8 +184,8 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): f.write('<LI> ' + object_sitemap % (_('Global Module Index'), 'modindex.html')) # the TOC - tocdoc = self.env.get_and_resolve_doctree(self.config.master_doc, self, - prune_toctrees=False) + tocdoc = self.env.get_and_resolve_doctree( + self.config.master_doc, self, prune_toctrees=False) def write_toc(node, ullevel=0): if isinstance(node, nodes.list_item): f.write('<LI> ') @@ -204,8 +206,9 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): elif isinstance(node, addnodes.compact_paragraph): for subnode in node: write_toc(subnode, ullevel) - istoctree = lambda node: isinstance(node, addnodes.compact_paragraph) and \ - node.has_key('toctree') + def istoctree(node): + return isinstance(node, addnodes.compact_paragraph) and \ + node.has_key('toctree') for node in tocdoc.traverse(istoctree): write_toc(node) f.write(contents_footer) @@ -230,7 +233,8 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder): write_param('Local', refs[0]) else: for i, ref in enumerate(refs): - write_param('Name', '[%d] %s' % (i, ref)) # XXX: better title? + # XXX: better title? + write_param('Name', '[%d] %s' % (i, ref)) write_param('Local', ref) f.write('</OBJECT>\n') if subitems: |