我使用的是皮多斯特式,我想知道为什么它会对我的代码引发错误D407 / Missing dashed underline after section ('Example')。
我的代码如下所示:
def foo():
"""
Function description here...
Example:
Some example here...
"""
# some code here过去,当我尝试添加Note:部分时,我也遇到过类似的问题。我不知道这是否为假阳性错误,因为我正在使用reStructuredText,而且我知道pydoc样式有时在区分reST与Google和numpy样式方面存在问题。如果我错了,请纠正我,但reST是否与默认约定下描述的pep257节有关,这样我就可以真正地关闭所有这些检查: D203,D212,D213,…,D407,.?
发布于 2021-12-02 14:48:07
看来我的预感是对的,D407是与reStructuredText无关的错误之一。
Note: (与Example:一样)部分在reStructuredText中未使用,因为应该使用..note::。
https://stackoverflow.com/questions/66408022
复制相似问题