Skip to content

Commit

Permalink
DOC: require returns section in validation script (pandas-dev#19994)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and pandres committed Mar 10, 2018
1 parent a8fa74a commit 918946b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/validate_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ def see_also(self):
def examples(self):
return self.doc['Examples']

@property
def returns(self):
return self.doc['Returns']

@property
def first_line_ends_in_dot(self):
if self.doc:
Expand Down Expand Up @@ -436,6 +440,9 @@ def validate_one(func_name):
for param_err in param_errs:
errs.append('\t{}'.format(param_err))

if not doc.returns:
errs.append('No returns section found')

mentioned_errs = doc.mentioned_private_classes
if mentioned_errs:
errs.append('Private classes ({}) should not be mentioned in public '
Expand Down

0 comments on commit 918946b

Please sign in to comment.