Add an optional default_value option to sets returned from ModuleParameters to specify a different default value help text than the value of default field. This is useful for cases where the default value depends on the environment Signed-off-by: Tomas Glozar <tglozar@xxxxxxxxxx> --- rteval/modules/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py index e7025ce..469d0f0 100644 --- a/rteval/modules/__init__.py +++ b/rteval/modules/__init__.py @@ -307,12 +307,13 @@ the information provided by the module""" if default is None: default = 'default' in s and s['default'] or None + default_text = s['default_text'] if 'default_text' in s else default grparser.add_argument('--%s-%s' % (shortmod, o), dest="%s___%s" % (shortmod, o), action='store', help='%s%s' % (descr, - default and ' (default: %s)' % default or ''), + default and ' (default: %s)' % default_text or ''), default=default, metavar=metavar) -- 2.41.0