我正在尝试使用 pydocstyle 检查我的文档字符串的质量,但出现此错误:
D205: 1 blank line required between summary line and description (found 0)
这是我的代码的样子
def func(input):
"""
Function that does something interesting.
Args:
-input- Input of the function
Returns:
output- Output of the function
"""
data = words + sentences
corpus= somefunction(data)
Run Code Online (Sandbox Code Playgroud)
当我在文档字符串和函数语句之间添加一个空行时;
def func(input):
"""
Function that does something interesting.
Args:
-input- Input of the function
Returns:
output- Output of the function
"""
data = words + sentences
corpus= somefunction(data)
Run Code Online (Sandbox Code Playgroud)
我得到这个错误:
D202: No blank lines allowed after function docstring (found 1)
我该如何解决?谢谢你的帮助。
ack*_*ack 12
def func(input):
"""**summary line** Function to do something interesting.
**description starts after blank line above**
Args:
-input- Input of the function
Returns:
output- Output of the function
"""
# no blank line allowed here
data = [words, sentences]
corpus = somefunction(data)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9278 次 |
| 最近记录: |