Skip to content

Commit f2d6449

Browse files
committed
update validate_docstrings.py: clearer error message
1 parent 20b32e7 commit f2d6449

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/validate_docstrings.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,9 @@ def validate_one(func_name):
497497
else:
498498
returns_errs = []
499499
if len(doc.returns) == 1 and doc.returns[0][1]:
500-
returns_errs.append('No name is to be provided when '
501-
'returning a single value.')
500+
returns_errs.append('The first line of the Returns section '
501+
'should contain only the type, unless '
502+
'multiple values are being returned.')
502503
for name, type_, desc in doc.returns:
503504
desc = ''.join(desc)
504505
name = '"' + name + '" ' if type_ else ''

0 commit comments

Comments
 (0)