狮身人面像不能抓住绳结

时间:2019-07-09 09:15:33

标签: python-3.x python-sphinx

我试图通过使用狮身人面像制作文档

我使用sphinx-apidoc -f -o source/ ../ 然后make html 它为我创建了文档,但是此文档不包含文件中的码头字符串

我使用相同的船坞线:

def send_confirm_msg(self, token, email, legal_type):
    """
    Отсылает письмо с потверждением
    :param token: токен потверждения
    :param email: емаил на который придёт ссылка
    :return: None
    """

我的朋友

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
# sys.path.insert(0, os.path.abspath('/home/projects/gh_project/'))
# sys.path.insert(0, os.path.abspath('/home/projects/gh_project/package'))
# sys.path.insert(0, os.path.abspath('/home/projects/gh_project/api_middleman/app'))
# sys.path.insert(0, os.path.abspath('/home/projects/gh_project/api_middleman/db_create'))


# -- Project information -----------------------------------------------------

project = 'MIS'
copyright = '2019, ICode'
author = 'ICode'

# The full version, including alpha/beta/rc tags
release = '0.0.0.1'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'ru'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = 'agogo'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

html_show_copyright = False
html_show_sphinx = False

第一时间

gh\_project.api\_legal.app.views module
---------------------------------------

.. automodule:: gh_project.api_legal.app.views
   :members:
   :undoc-members:
   :show-inheritance:

api\_middleman.logger\_conf module
----------------------------------

.. automodule:: api_middleman.logger_conf
   :members:
   :undoc-members:
   :show-inheritance:

但是结果是我看到这个https://imgur.com/jyYeqlK没有任何停顿字符串,它没有缓存任何停顿字符串如何解决此问题 我在def函数中使用的所有ockockstring可能对此有问题吗?

1 个答案:

答案 0 :(得分:0)

在conf.py中 有必要添加sys.path.insert(0, os.path.abspath('../..'))