Skip to content

Commit 86a7004

Browse files
committed
MAINT: Clean up the returns check, too
1 parent 5efa1d1 commit 86a7004

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

numpydoc/validate.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,10 @@ def validate(func_name):
570570
if not desc:
571571
errs.append(error("RT03"))
572572
else:
573-
desc = "\n".join(desc)
574-
if desc[0].isalpha() and not desc[0].isupper():
573+
if desc[0][0].isalpha() and not desc[0][0].isupper():
575574
errs.append(error("RT04"))
576-
if not desc.endswith(".") and \
577-
not desc.split("\n")[-1].startswith(IGNORE_STARTS):
575+
if not desc[-1].endswith(".") and \
576+
not desc[-1].startswith(IGNORE_STARTS):
578577
errs.append(error("RT05"))
579578

580579
if not doc.yields and "yield" in doc.method_source:

0 commit comments

Comments
 (0)