本文整理汇总了Python中sphinx.__display_version__方法的典型用法代码示例。如果您正苦于以下问题:Python sphinx.__display_version__方法的具体用法?Python sphinx.__display_version__怎么用?Python sphinx.__display_version__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sphinx
的用法示例。
在下文中一共展示了sphinx.__display_version__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
# I need autodoc
app.setup_extension('sphinx.ext.autodoc')
app.add_node(autosummary_toc,
html=(autosummary_toc_visit_html, autosummary_noop),
latex=(autosummary_noop, autosummary_noop),
text=(autosummary_noop, autosummary_noop),
man=(autosummary_noop, autosummary_noop),
texinfo=(autosummary_noop, autosummary_noop))
app.add_node(autosummary_table,
html=(autosummary_table_visit_html, autosummary_noop),
latex=(autosummary_noop, autosummary_noop),
text=(autosummary_noop, autosummary_noop),
man=(autosummary_noop, autosummary_noop),
texinfo=(autosummary_noop, autosummary_noop))
app.add_directive('autosummary', Autosummary)
app.add_role('autolink', autolink_role)
app.connect('doctree-read', process_autosummary_toc)
app.connect('builder-inited', process_generate_options)
app.add_config_value('autosummary_generate', [], True)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例2: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
app.add_node(
gallery,
html=(visit_gallery_node, depart_gallery_node),
latex=(visit_gallery_node, depart_gallery_node),
text=(visit_gallery_node, depart_gallery_node),
man=(visit_gallery_node, depart_gallery_node),
texinfo=(visit_gallery_node, depart_gallery_node))
app.add_directive('gallery', Gallery)
app.add_directive('include_examples', IncludeExamples)
app.connect('builder-inited', setup_env)
app.connect('builder-inited', notebooks_to_rst)
app.connect('doctree-read', extract_gallery_entries)
app.connect('doctree-resolved', add_entries_to_gallery)
return {'version': sphinx.__display_version__,
'parallel_read_safe': True}
示例3: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
app.connect('autodoc-process-docstring', link_aliases)
app.connect('autodocsumm-grouper', group_fmt_attributes)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例4: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
# Placeholder to initialize the folder before
# generating the documentation.
app.add_role('keras2onnxversion', kerasonnx_version_role)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例5: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app: Sphinx) -> Dict[str, Any]:
"""Sphinx extension setup function.
When the extension is loaded, Sphinx imports this module and executes
the ``setup()`` function, which in turn notifies Sphinx of everything
the extension offers.
Parameters
----------
app : sphinx.application.Sphinx
Application object representing the Sphinx process
See Also
--------
`The Sphinx documentation on Extensions
<http://sphinx-doc.org/extensions.html>`_
`The Extension Tutorial <http://sphinx-doc.org/extdev/tutorial.html>`_
`The Extension API <http://sphinx-doc.org/extdev/appapi.html>`_
"""
if not isinstance(app, Sphinx):
# probably called by tests
return {'version': __version__, 'parallel_read_safe': True}
_patch_python_domain()
app.setup_extension('autodoc') #change
app.connect('autodoc-process-docstring', _process_docstring)
app.connect('autodoc-skip-member', _skip_member)
for name, (default, rebuild) in Config._config_values.items():
app.add_config_value(name, default, rebuild)
return {'version': __version__, 'parallel_read_safe': True}
示例6: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app: Sphinx) -> Dict[str, Any]:
app.add_autodocumenter(ModuleDocumenter)
app.add_autodocumenter(ClassDocumenter)
app.add_autodocumenter(ExceptionDocumenter)
app.add_autodocumenter(DataDocumenter)
app.add_autodocumenter(DataDeclarationDocumenter)
app.add_autodocumenter(FunctionDocumenter)
app.add_autodocumenter(DecoratorDocumenter)
app.add_autodocumenter(MethodDocumenter)
app.add_autodocumenter(AttributeDocumenter)
app.add_autodocumenter(PropertyDocumenter)
app.add_autodocumenter(InstanceAttributeDocumenter)
app.add_autodocumenter(SlotsAttributeDocumenter)
app.add_config_value('autoclass_content', 'class', True)
app.add_config_value('autodoc_member_order', 'alphabetic', True)
app.add_config_value('autodoc_default_flags', [], True)
app.add_config_value('autodoc_default_options', {}, True)
app.add_config_value('autodoc_docstring_signature', True, True)
app.add_config_value('autodoc_mock_imports', [], True)
app.add_config_value('autodoc_typehints', "signature", True, ENUM("signature", "none"))
app.add_config_value('autodoc_warningiserror', True, True)
app.add_config_value('autodoc_inherit_docstrings', True, True)
app.add_event('autodoc-before-process-signature')
app.add_event('autodoc-process-docstring')
app.add_event('autodoc-process-signature')
app.add_event('autodoc-skip-member')
app.connect('config-inited', merge_autodoc_default_flags)
app.setup_extension('autodoc.type_comment')
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例7: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app: Sphinx) -> Dict[str, Any]:
app.connect('autodoc-before-process-signature', update_annotations_using_type_comments)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例8: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
"""add custom directive into Sphinx so that it is found during document parsing"""
app.add_directive('embed-options', EmbedOptionsDirective)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例9: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
"""add custom directive into Sphinx so that it is found during document parsing"""
app.add_directive('embed-shell-cmd', EmbedShellCmdDirective)
app.add_node(failed_node, html=(visit_failed_node, depart_failed_node))
app.add_node(cmd_node, html=(visit_cmd_node, depart_cmd_node))
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例10: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
"""add custom directive into Sphinx so that it is found during document parsing"""
app.add_directive('embed-code', EmbedCodeDirective)
node_setup(app)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例11: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
"""add custom directive into Sphinx so that it is found during document parsing"""
app.add_directive('embed-bibtex', EmbedBibtexDirective)
app.add_node(bibtex_node, html=(visit_bibtex_node, depart_bibtex_node))
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例12: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
"""add custom directive into Sphinx so that it is found during document parsing"""
app.add_directive('content-container', ContentContainerDirective)
app.add_directive('embed-compare', EmbedCompareDirective)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例13: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
"""Setup `dsp` Sphinx extension module. """
app.setup_extension('sphinx.ext.graphviz') # To set all defaults.
app.add_node(
dsp,
html=(html_visit_dispatcher, None),
latex=(latex_visit_graphviz, None),
texinfo=(texinfo_visit_graphviz, None),
text=(text_visit_graphviz, None),
man=(man_visit_graphviz, None)
)
app.add_directive('dsp', DispatcherSphinxDirective)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
示例14: setup
# 需要导入模块: import sphinx [as 别名]
# 或者: from sphinx import __display_version__ [as 别名]
def setup(app):
# Placeholder to initialize the folder before
# generating the documentation.
app.add_role('skl2onnxversion', skl2onnx_version_role)
app.add_directive('supported-skl2onnx', SupportedSkl2OnnxDirective)
app.add_directive('supported-onnx-ops', SupportedOnnxOpsDirective)
app.add_directive('supported-sklearn-ops', SupportedSklearnOpsDirective)
app.add_directive('covered-sklearn-ops', AllSklearnOpsDirective)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}