PyCharm 和 reStructuredText (Sphinx) 文档弹出窗口
PyCharm and reStructuredText (Sphinx) documentation popups
想象一下,我想在 PyCharm 4.5 社区版(也在 5.0 中尝试过)中看到一个简单方法的文档字符串弹出窗口。
我用 epytext 语法(Epydoc 生成器自 2008 年起不受支持,仅适用于 Python2)和 reStructuredText 语法(由 Sphinx 使用 - 积极支持的生成器,用于官方 python 文档)
epytext one 在 PyCharm 文档弹出窗口中完美运行
PyCharm works with epytext Screenshot
但是 reStructuredText 根本不显示任何参数!
PyCharm fails with reStructuredText Screenshot
尝试使用 PyCharm 设置来处理这个问题,阅读 PyCharm 帮助,搜索 PyCharm bugtracker 并使用 Google 无法帮助我找到PyCharm 中的这些文档字符串弹出窗口无法与社区推荐的文档字符串标记语言一起正常工作的原因。
这是因为该功能的需求量不大吗?也许,是否有一些有用的替代方法可以查看 PyCharm 甚至另一个 IDE 中的现代文档标记?我还需要能够生成 HTML 格式漂亮的文档。
我在这里 another topic 找到了与同一问题相关的问题,但自去年以来仍未得到答复。所以,我猜想在 modern IDE.
中查看现代文档的愿望有什么问题
这是我的代码示例
def find_links(self, issue, link_type):
"""
Find all issues linked with C{issue} with C{link_type}.
@param issue: Issue key
@type issue: str
@param link_type: Accepts either Type Name (like 'Child') or Link Description (like 'child of')
@type link_type: str
@return: Keys of found issues
@rtype: list
"""
result_keys = []
link_list = self.get_link_list(issue)
for link in link_list:
... # omitted
return result_keys
def test_sphinx_docs_method(self, issue, link_type):
"""
Find all issues linked with *issue* with *link_type*.
:param issue: Issue key
:type issue: str
:param link_type: Accepts either Type Name (like 'Child') or Link Description (like 'child of')
:type link_type: str
:return: Keys of found issues
:rtype: list
"""
result_keys = []
link_list = self.get_link_list(issue)
for link in link_list:
... # omitted
return result_keys
我不知道这个功能是否只在最近的 PyCharm 版本中出现,所以你有什么版本?在我的 PyCharm CE 2016.2.2 中,它看起来像屏幕截图。
检查首选项 > 编辑器 > 常规 > 代码完成,确保选项 "Autopop documentation" 已启用。
祝你好运!
想象一下,我想在 PyCharm 4.5 社区版(也在 5.0 中尝试过)中看到一个简单方法的文档字符串弹出窗口。
我用 epytext 语法(Epydoc 生成器自 2008 年起不受支持,仅适用于 Python2)和 reStructuredText 语法(由 Sphinx 使用 - 积极支持的生成器,用于官方 python 文档)
epytext one 在 PyCharm 文档弹出窗口中完美运行
PyCharm works with epytext Screenshot
但是 reStructuredText 根本不显示任何参数!
PyCharm fails with reStructuredText Screenshot
尝试使用 PyCharm 设置来处理这个问题,阅读 PyCharm 帮助,搜索 PyCharm bugtracker 并使用 Google 无法帮助我找到PyCharm 中的这些文档字符串弹出窗口无法与社区推荐的文档字符串标记语言一起正常工作的原因。
这是因为该功能的需求量不大吗?也许,是否有一些有用的替代方法可以查看 PyCharm 甚至另一个 IDE 中的现代文档标记?我还需要能够生成 HTML 格式漂亮的文档。
我在这里 another topic 找到了与同一问题相关的问题,但自去年以来仍未得到答复。所以,我猜想在 modern IDE.
中查看现代文档的愿望有什么问题这是我的代码示例
def find_links(self, issue, link_type):
"""
Find all issues linked with C{issue} with C{link_type}.
@param issue: Issue key
@type issue: str
@param link_type: Accepts either Type Name (like 'Child') or Link Description (like 'child of')
@type link_type: str
@return: Keys of found issues
@rtype: list
"""
result_keys = []
link_list = self.get_link_list(issue)
for link in link_list:
... # omitted
return result_keys
def test_sphinx_docs_method(self, issue, link_type):
"""
Find all issues linked with *issue* with *link_type*.
:param issue: Issue key
:type issue: str
:param link_type: Accepts either Type Name (like 'Child') or Link Description (like 'child of')
:type link_type: str
:return: Keys of found issues
:rtype: list
"""
result_keys = []
link_list = self.get_link_list(issue)
for link in link_list:
... # omitted
return result_keys
我不知道这个功能是否只在最近的 PyCharm 版本中出现,所以你有什么版本?在我的 PyCharm CE 2016.2.2 中,它看起来像屏幕截图。
检查首选项 > 编辑器 > 常规 > 代码完成,确保选项 "Autopop documentation" 已启用。
祝你好运!