Skip to content

Commit

Permalink
Keep original spacing in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Aug 14, 2023
1 parent dc8283d commit b03fb56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/custom_checks/docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ def parse_doc(doc):
continue
if line_indent == args_indent:
idx_end = i
if not lines[i - 1].strip(): # Note: i-1 >= 0
# If last line was empty, we keep the spacing:
idx_end -= 1
break
if line_indent > args_indent + 4:
# Assume multilines belong to previous line:
Expand Down

0 comments on commit b03fb56

Please sign in to comment.