diff options
author | 2023-01-16 22:55:36 +0200 | |
---|---|---|
committer | 2023-01-16 22:55:36 +0200 | |
commit | 8addc22ed18f84e1047be4ca71084832bdb1cdd8 (patch) | |
tree | 26b5bc5e022e280add1c3ebd5349f467bc99199a | |
parent | fileutils: small cleanup and modernization (diff) | |
download | snakeoil-8addc22ed18f84e1047be4ca71084832bdb1cdd8.tar.gz snakeoil-8addc22ed18f84e1047be4ca71084832bdb1cdd8.tar.bz2 snakeoil-8addc22ed18f84e1047be4ca71084832bdb1cdd8.zip |
cli.arghparse: improve _format_args for Delayed
Resolves: https://github.com/pkgcore/pkgcheck/issues/520
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/snakeoil/cli/arghparse.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/snakeoil/cli/arghparse.py b/src/snakeoil/cli/arghparse.py index 09eaed36..375ffe42 100644 --- a/src/snakeoil/cli/arghparse.py +++ b/src/snakeoil/cli/arghparse.py @@ -556,6 +556,8 @@ class CsvHelpFormatter(argparse.HelpFormatter): result = "%s[,-%s,...]" % get_metavar(2) elif isinstance(action, (CommaSeparatedElements, CommaSeparatedElementsAppend)): result = "%s[,-%s,+%s...]" % get_metavar(3) + elif isinstance(action, Delayed): + result = self._format_args(action.target, default_metavar) else: result = super()._format_args(action, default_metavar) return result |