I'm trying to use pydocstyle to check the quality of my docstring and I'm getting this error:
D205: 1 blank line required between summary line and description (found 0)
This is how my code looks like
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)
When I put a blank line between the docstring and the function statements like so;
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)
I get the this errror:
D202: No blank lines allowed after function docstring (found 1)
How do I resolve this? Thanks for you help.
See PEP 257 -- Docstring Conventions
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With