Skip to content

Commit

Permalink
Use splitlines() iso. comprehension
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
erlend-aasland and AlexWaygood authored Aug 4, 2023
1 parent fd632eb commit 1d244dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5520,7 +5520,7 @@ def format_docstring(self) -> str:
# Guido said Clinic should enforce this:
# http://mail.python.org/pipermail/python-dev/2013-June/127110.html

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

0 comments on commit 1d244dc

Please sign in to comment.