Fix long lines.

This commit is contained in:
Georg Brandl 2009-07-05 12:28:45 +02:00
parent c02b7149aa
commit 43f475b74e
11 changed files with 28 additions and 17 deletions

View File

@ -58,7 +58,7 @@ The builder's "name" must be given to the **-b** command-line option of
.. class:: DevhelpBuilder
This builder produces the same output as the standalone HTML builder, but
also generates `GNOME Devhelp <http://live.gnome.org/devhelp>`__
also generates `GNOME Devhelp <http://live.gnome.org/devhelp>`__
support file that allows the GNOME Devhelp reader to view them.
Its name is ``devhelp``.

View File

@ -220,6 +220,6 @@ The following variables available in the templates:
for classes.
.. note::
You can use the :dir:`autosummary` directive in the stub pages.
Stub pages are generated also based on these directives.

View File

@ -150,7 +150,8 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
staticdir = path.join(outdir, '_static')
imagesdir = path.join(outdir, '_images')
for root, dirs, files in os.walk(outdir):
resourcedir = root.startswith(staticdir) or root.startswith(imagesdir)
resourcedir = root.startswith(staticdir) or \
root.startswith(imagesdir)
for fn in files:
if (resourcedir and not fn.endswith('.js')) or \
fn.endswith('.html'):

View File

@ -226,7 +226,7 @@ class Autosummary(Directive):
``[(name, signature, summary_string, real_name), ...]``.
"""
env = self.state.document.settings.env
prefixes = ['']
if env.currmodule:
prefixes.insert(0, env.currmodule)

View File

@ -233,9 +233,12 @@ def find_autosummary_in_lines(lines, module=None, filename=None):
corresponding options set.
"""
autosummary_re = re.compile(r'^\s*\.\.\s+autosummary::\s*')
automodule_re = re.compile(r'^\s*\.\.\s+automodule::\s*([A-Za-z0-9_.]+)\s*$')
module_re = re.compile(r'^\s*\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
autosummary_item_re = re.compile(r'^\s+(~?[_a-zA-Z][a-zA-Z0-9_.]*)\s*.*?')
automodule_re = re.compile(
r'^\s*\.\.\s+automodule::\s*([A-Za-z0-9_.]+)\s*$')
module_re = re.compile(
r'^\s*\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
autosummary_item_re = re.compile(
r'^\s+(~?[_a-zA-Z][a-zA-Z0-9_.]*)\s*.*?')
toctree_arg_re = re.compile(r'^\s+:toctree:\s*(.*?)\s*$')
template_arg_re = re.compile(r'^\s+:template:\s*(.*?)\s*$')

View File

@ -237,7 +237,8 @@ def setup(app):
app.add_config_value('pngmath_dvipng', 'dvipng', 'html')
app.add_config_value('pngmath_latex', 'latex', 'html')
app.add_config_value('pngmath_use_preview', False, 'html')
app.add_config_value('pngmath_dvipng_args', ['-gamma 1.5', '-D 110'], 'html')
app.add_config_value('pngmath_dvipng_args',
['-gamma 1.5', '-D 110'], 'html')
app.add_config_value('pngmath_latex_args', [], 'html')
app.add_config_value('pngmath_latex_preamble', '', 'html')
app.connect('build-finished', cleanup_tempdir)

View File

@ -121,8 +121,8 @@ class _TranslationProxy(UserString.UserString, object):
return '<%s broken>' % self.__class__.__name__
def mygettext(string):
"""Used instead of _ when creating TranslationProxies, because _ is not bound
yet at that time."""
"""Used instead of _ when creating TranslationProxies, because _ is
not bound yet at that time."""
return _(string)
def lazy_gettext(string):

View File

@ -332,7 +332,8 @@ devhelp:
\t@echo "Build finished."
\t@echo "To view the help file:"
\t@echo "# mkdir -p $$HOME/.local/share/devhelp/%(project_fn)s"
\t@echo "# ln -s %(rbuilddir)s/devhelp $$HOME/.local/share/devhelp/%(project_fn)s"
\t@echo "# ln -s %(rbuilddir)s/devhelp \
$$HOME/.local/share/devhelp/%(project_fn)s"
\t@echo "# devhelp"
latex:

View File

@ -162,7 +162,8 @@ class XRefRole(object):
target = target[:-2]
return title, target
def __call__(self, typ, rawtext, text, lineno, inliner, options={}, content=[]):
def __call__(self, typ, rawtext, text, lineno, inliner,
options={}, content=[]):
env = inliner.document.settings.env
if not typ:
typ = env.config.default_role
@ -185,7 +186,8 @@ class XRefRole(object):
refcaption=has_explicit_title)
# we may need the line number for warnings
pnode.line = lineno
title, target = self.process_link(env, pnode, has_explicit_title, title, target)
title, target = self.process_link(env, pnode,
has_explicit_title, title, target)
pnode['reftarget'] = target
pnode += self.innernodeclass(rawtext, title, classes=['xref'])
return [pnode], []

View File

@ -27,7 +27,8 @@ if sys.version_info < (2, 5):
# begin code copied from utf_8_sig.py in Python 2.6
def encode(input, errors='strict'):
return (codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0], len(input))
return (codecs.BOM_UTF8 + codecs.utf_8_encode(input, errors)[0],
len(input))
def decode(input, errors='strict'):
prefix = 0

View File

@ -641,11 +641,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.body.append('\\hline\n')
self.body.append('\\endfirsthead\n\n')
self.body.append('\multicolumn{%s}{c}%%\n' % self.table.colcount)
self.body.append('{{\\bfseries \\tablename\\ \\thetable{} -- %s}} \\\\\n' % _('continued from previous page'))
self.body.append('{{\\bfseries \\tablename\\ \\thetable{} -- %s}} '
'\\\\\n' % _('continued from previous page'))
self.body.append('\\hline\n')
self.body.append('\\endhead\n\n')
self.body.append('\\hline \multicolumn{%s}{|r|}{{%s}} \\\\ \\hline\n' % (
self.table.colcount, _('Continued on next page')))
self.body.append('\\hline \multicolumn{%s}{|r|}{{%s}} \\\\ '
'\\hline\n' % (self.table.colcount,
_('Continued on next page')))
self.body.append('\\endfoot\n\n')
self.body.append('\\hline\n')
self.body.append('\\endlastfoot\n\n')