From 67a9115146ca71fee665062fd4e5b977587ff5cf Mon Sep 17 00:00:00 2001 From: hongshaoyang Date: Sat, 3 Nov 2018 22:33:17 +0800 Subject: [PATCH] add number of Errors, Warnings to scripts/validate_docstrings.py (#23150) --- scripts/validate_docstrings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/validate_docstrings.py b/scripts/validate_docstrings.py index 29d485550be40b..4b1834adcaf33a 100755 --- a/scripts/validate_docstrings.py +++ b/scripts/validate_docstrings.py @@ -610,11 +610,11 @@ def header(title, width=80, char='#'): fd.write('{}\n'.format(doc_info['docstring'])) fd.write(header('Validation')) if doc_info['errors']: - fd.write('Errors found:\n') + fd.write('{} Errors found:\n'.format(len(doc_info['errors']))) for err in doc_info['errors']: fd.write('\t{}\n'.format(err)) if doc_info['warnings']: - fd.write('Warnings found:\n') + fd.write('{} Warnings found:\n'.format(len(doc_info['warnings']))) for wrn in doc_info['warnings']: fd.write('\t{}\n'.format(wrn))