【发布时间】:2016-08-30 19:06:02
【问题描述】:
让我们想象一下,我想在 PyCharm 4.5 社区版(也在 5.0 中尝试过)中看到一个简单方法的文档字符串弹出窗口。
我用 epytext 语法(自 2008 年以来不支持 Epydoc 生成器,仅适用于 Python2)和 reStructuredText 语法(Sphinx 积极使用)写下了这些文档字符串支持的生成器,用于官方 python 文档)
epytext 在 PyCharm 文档弹出窗口中完美运行
PyCharm works with epytext Screenshot
但是 reStructuredText 根本不显示任何参数!
PyCharm fails with reStructuredText Screenshot
尝试使用 PyCharm 设置处理此问题、阅读 PyCharm 帮助、搜索 PyCharm 错误跟踪器并使用 Google 无法帮助我找到 PyCharm 中的这些文档字符串弹出窗口无法与社区推荐的文档字符串标记一起正常工作的原因语言。
这是因为功能需求低吗?也许,是否有一些有用的替代方法可以查看 PyCharm 甚至其他 IDE 中的现代文档标记?我还需要能够生成 HTML 格式漂亮的文档页。
我在这里找到了another topic,与同一问题有关,但自去年以来仍未得到答复。所以,我猜想在现代 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
【问题讨论】:
标签: python pycharm python-sphinx epydoc