Skip to content

Commit 1d244dc

Browse files
Use splitlines() iso. comprehension
Co-authored-by: Alex Waygood <[email protected]>
1 parent fd632eb commit 1d244dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tools/clinic/clinic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5520,7 +5520,7 @@ def format_docstring(self) -> str:
55205520
# Guido said Clinic should enforce this:
55215521
# http://mail.python.org/pipermail/python-dev/2013-June/127110.html
55225522

5523-
lines = [line for line in f.docstring.split('\n')]
5523+
lines = f.docstring.splitlines()
55245524
if len(lines) >= 2:
55255525
if lines[1]:
55265526
fail("Docstring for " + f.full_name + " does not have a summary line!\n" +

0 commit comments

Comments
 (0)