Skip to content

Commit fb8b59b

Browse files
committed
DOC: Validation script checks for tabs
Add a check to validate the docstrings dont have tabs at the begining of the line.
1 parent 4131149 commit fb8b59b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/validate_docstrings.py

+6
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,12 @@ def validate_one(func_name):
455455
if not rel_desc:
456456
errs.append('Missing description for '
457457
'See Also "{}" reference'.format(rel_name))
458+
459+
for line in doc.raw_doc.splitlines():
460+
if re.match("^ *\t", line):
461+
errs.append('Tabs found at the start of line "{}", '
462+
'please use whitespace only'.format(line.lstrip()))
463+
458464
examples_errs = ''
459465
if not doc.examples:
460466
errs.append('No examples section found')

0 commit comments

Comments
 (0)