Skip to content

Commit 7ea58df

Browse files
author
awu42
committed
Checking if stderr output will be suppressed (pandas-dev#26941)
1 parent 3d3a7f4 commit 7ea58df

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/validate_rst_title_capitalization.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,13 @@ def main(source_paths: List[str], output_format: str) -> bool:
413413
414414
Returns
415415
-------
416-
bool
416+
is_failed : bool
417417
True if there are headings that are printed, False if not
418418
419419
'''
420420

421+
is_failed : bool = False
422+
421423
# Make a list of all RST files from command line directory list
422424
directory_list = find_rst_files(source_paths)
423425

@@ -428,7 +430,7 @@ def main(source_paths: List[str], output_format: str) -> bool:
428430

429431
# Return an exit status of 0 if there are no bad titles in the dictionary
430432
if (len(bad_title_dict) == 0):
431-
return False
433+
return is_failed
432434

433435
# Print bad_title_dict Results
434436
print()
@@ -438,8 +440,8 @@ def main(source_paths: List[str], output_format: str) -> bool:
438440
key + ":" + str(line[1]) + ": " + err_msg + " \"" + line[0] + "\""
439441
)
440442

441-
# Exit status of 1
442-
return True
443+
# Exit status of 0
444+
return is_failed
443445

444446

445447
if __name__ == "__main__":

0 commit comments

Comments
 (0)