From 6af9283fce33aba97ecc071195a227f3deeef44b Mon Sep 17 00:00:00 2001 From: Zhengbo Wang <77875500+luke396@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:58:28 +0800 Subject: [PATCH 1/3] Update error message format in validate_docstrings.py --- scripts/validate_docstrings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate_docstrings.py b/scripts/validate_docstrings.py index 76d64d27b221c..d69fbcd5ee505 100755 --- a/scripts/validate_docstrings.py +++ b/scripts/validate_docstrings.py @@ -432,7 +432,7 @@ def header(title, width=80, char="#") -> str: if err_code == "EX02": # Failing examples are printed at the end sys.stderr.write("\tExamples do not pass tests\n") continue - sys.stderr.write(f"\t{err_desc}\n") + sys.stderr.write(f"{err_code}\t{err_desc}\n") else: sys.stderr.write(f'Docstring for "{func_name}" correct. :)\n') From a68b9a3b8a4cb925201a03613ce70889833c81d6 Mon Sep 17 00:00:00 2001 From: Zhengbo Wang <77875500+luke396@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:10:31 +0800 Subject: [PATCH 2/3] Add one tab at begining --- scripts/validate_docstrings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate_docstrings.py b/scripts/validate_docstrings.py index d69fbcd5ee505..e4dabb89415f8 100755 --- a/scripts/validate_docstrings.py +++ b/scripts/validate_docstrings.py @@ -432,7 +432,7 @@ def header(title, width=80, char="#") -> str: if err_code == "EX02": # Failing examples are printed at the end sys.stderr.write("\tExamples do not pass tests\n") continue - sys.stderr.write(f"{err_code}\t{err_desc}\n") + sys.stderr.write(f"\t{err_code}\t{err_desc}\n") else: sys.stderr.write(f'Docstring for "{func_name}" correct. :)\n') From bc377cf938cb70d5da5deca9e370ba6b7f746693 Mon Sep 17 00:00:00 2001 From: Zhengbo Wang <77875500+luke396@users.noreply.github.com> Date: Mon, 15 Jan 2024 11:08:31 +0800 Subject: [PATCH 3/3] Solve conflict --- scripts/validate_docstrings.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/validate_docstrings.py b/scripts/validate_docstrings.py index 1f5b9ed8b3470..682d64244bc1f 100755 --- a/scripts/validate_docstrings.py +++ b/scripts/validate_docstrings.py @@ -392,9 +392,6 @@ def header(title, width=80, char="#") -> str: if result["errors"]: sys.stderr.write(f'{len(result["errors"])} Errors found for `{func_name}`:\n') for err_code, err_desc in result["errors"]: - if err_code == "EX02": # Failing examples are printed at the end - sys.stderr.write("\tExamples do not pass tests\n") - continue sys.stderr.write(f"\t{err_code}\t{err_desc}\n") else: sys.stderr.write(f'Docstring for "{func_name}" correct. :)\n')