From pycodestyle documentation:
D205
: 1 blank line required between summary line and description
D400
: First line should end with a period
So this should be fine:
def foo():
"""This is the first line of the summary.
and this is the second.
This is the description.
"""
To answer you comment:
Pep-0257 says:
Multi-line docstrings consist of a summary line just like a one-line
docstring, followed by a blank line, followed by a more elaborate
description. The summary line may be used by automatic indexing tools;
it is important that it fits on one line and is separated from the
rest of the docstring by a blank line.
So you should shrink it down so that it fits in one line. That first line is used by some libraries like click
. So multi line summary is not correct at the first place.