mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable' into 1.5-release
This commit is contained in:
commit
4b5eebdc87
@ -95,6 +95,8 @@ class desc_signature_line(nodes.Part, nodes.Inline, nodes.TextElement):
|
||||
|
||||
class desc_addname(nodes.Part, nodes.Inline, nodes.TextElement):
|
||||
"""Node for additional name parts (module name, class name)."""
|
||||
|
||||
|
||||
# compatibility alias
|
||||
desc_classname = desc_addname
|
||||
|
||||
|
@ -402,6 +402,7 @@ Note: By default this script will not overwrite already created files.""")
|
||||
elif not opts.notoc:
|
||||
create_modules_toc_file(modules, opts)
|
||||
|
||||
|
||||
# So program can be started with "python -m sphinx.apidoc ..."
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -162,6 +162,7 @@ class LocalTimeZone(tzinfo):
|
||||
def dst(self, dt):
|
||||
return timedelta(0)
|
||||
|
||||
|
||||
ltz = LocalTimeZone()
|
||||
|
||||
|
||||
|
@ -1177,6 +1177,7 @@ class PickleHTMLBuilder(SerializingHTMLBuilder):
|
||||
globalcontext_filename = 'globalcontext.pickle'
|
||||
searchindex_filename = 'searchindex.pickle'
|
||||
|
||||
|
||||
# compatibility alias
|
||||
WebHTMLBuilder = PickleHTMLBuilder
|
||||
|
||||
|
@ -167,6 +167,7 @@ class ObjectDescription(Directive):
|
||||
self.after_content()
|
||||
return [self.indexnode, node]
|
||||
|
||||
|
||||
# backwards compatible old name
|
||||
DescDirective = ObjectDescription
|
||||
|
||||
|
@ -141,6 +141,7 @@ def members_set_option(arg):
|
||||
return ALL
|
||||
return set(x.strip() for x in arg.split(','))
|
||||
|
||||
|
||||
SUPPRESS = object()
|
||||
|
||||
|
||||
|
@ -152,6 +152,7 @@ def lazy_gettext(string):
|
||||
# return string
|
||||
return _TranslationProxy(mygettext, string)
|
||||
|
||||
|
||||
l_ = lazy_gettext
|
||||
|
||||
|
||||
|
@ -35,6 +35,8 @@ pydriver = driver.Driver(pygrammar, convert=nodes.convert)
|
||||
# an object with attributes corresponding to token and symbol names
|
||||
class sym(object):
|
||||
pass
|
||||
|
||||
|
||||
for k, v in iteritems(pygrammar.symbol2number):
|
||||
setattr(sym, k, v)
|
||||
for k, v in iteritems(token.tok_name):
|
||||
|
@ -485,6 +485,7 @@ def usage(argv, msg=None):
|
||||
print(msg, file=sys.stderr)
|
||||
print(file=sys.stderr)
|
||||
|
||||
|
||||
USAGE = """\
|
||||
Sphinx v%s
|
||||
Usage: %%prog [options] [projectdir]
|
||||
@ -675,5 +676,6 @@ def main(argv=sys.argv):
|
||||
|
||||
generate(d, templatedir=opts.templatedir)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
|
@ -170,6 +170,7 @@ def copy_static_entry(source, targetdir, builder, context={},
|
||||
builder, context, level=level+1,
|
||||
exclude_matchers=exclude_matchers)
|
||||
|
||||
|
||||
_DEBUG_HEADER = '''\
|
||||
# Sphinx version: %s
|
||||
# Python version: %s (%s)
|
||||
|
@ -90,6 +90,7 @@ def create_color_func(name):
|
||||
return colorize(name, text)
|
||||
globals()[name] = inner
|
||||
|
||||
|
||||
_attrs = {
|
||||
'reset': '39;49;00m',
|
||||
'bold': '01m',
|
||||
|
@ -125,6 +125,7 @@ def find_catalog_source_files(locale_dirs, locale, domains=None, gettext_compact
|
||||
|
||||
return catalogs
|
||||
|
||||
|
||||
# date_format mappings: ustrftime() to bable.dates.format_datetime()
|
||||
date_format_mappings = {
|
||||
'%a': 'EEE', # Weekday as locale’s abbreviated name.
|
||||
|
@ -351,4 +351,5 @@ def _new_copy(self):
|
||||
newnode.line = self.line
|
||||
return newnode
|
||||
|
||||
|
||||
nodes.Element.copy = _new_copy
|
||||
|
@ -144,6 +144,7 @@ class _DeprecationWrapper(object):
|
||||
return self._deprecated[attr]
|
||||
return getattr(self._mod, attr)
|
||||
|
||||
|
||||
sys.modules[__name__] = _DeprecationWrapper(sys.modules[__name__], dict(
|
||||
zip_longest = zip_longest,
|
||||
product = product,
|
||||
|
@ -81,8 +81,8 @@ def sphinx_smarty_pants(t):
|
||||
t = t.replace('"', '"')
|
||||
return t
|
||||
|
||||
# Constants for quote education.
|
||||
|
||||
# Constants for quote education.
|
||||
punct_class = r"""[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]"""
|
||||
end_of_word_class = r"""[\s.,;:!?)]"""
|
||||
close_class = r"""[^\ \t\r\n\[\{\(\-]"""
|
||||
|
@ -315,5 +315,6 @@ def getlspace(line):
|
||||
i += 1
|
||||
return i
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user