From 5f72f51cd190d7b43633200a26aa80603dbc8460 Mon Sep 17 00:00:00 2001 From: dilip patlolla Date: Thu, 21 Nov 2024 01:47:21 -0800 Subject: [PATCH] fix argparse formatting related test cases failure for 3.10 --- superbench/benchmarks/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/superbench/benchmarks/base.py b/superbench/benchmarks/base.py index 86c6b6d15..944099bb6 100644 --- a/superbench/benchmarks/base.py +++ b/superbench/benchmarks/base.py @@ -87,7 +87,12 @@ def get_configurable_settings(self): Return: All configurable settings in raw string. """ - return self._parser.format_help().strip() + message = self._parser.format_help().strip() + # Ensure consistent header across diff python argparse format_help output. + if "options:" in message: + message = message.replace("options:", "optional arguments:") + return message + def parse_args(self, ignore_invalid=False): """Parse the arguments.