我正在和使用vscode的人合作一个项目。我们编写Python代码。 我让他们为他们的函数生成docstring,他们使用了vscode中的Autodocstring。这是他们想出的一个docstring:
"""
Subclass ObjectCAD renderToFile method to render the scad file
in renders_dir
Arguments:
file_path {str} -- the destination path for the scad file
Returns:
None
"""
应该是谷歌风格的docstring。在
当我用Sphinx生成一个html文档时,下面是我得到的:
我应该得到这样的东西:
斯芬克斯配置中是否缺少一个选项?或者Autodocstring坏了?在
您显示的语法不是Google风格的语法(有关详细示例,请参见here)。应改为:
VSCode的autoDocstring扩展必须正确配置以生成Google样式的docstring(查找
autoDocstring.docstringFormat
)。在相关问题 更多 >
编程相关推荐