Skip to content

Commit 0a964b3

Browse files
author
Sourcery AI
committed
'Refactored by Sourcery'
1 parent 6a7ba97 commit 0a964b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shtab/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ def recurse(parser, prefix):
211211
new_nargs,
212212
) = recurse(
213213
positional.choices[choice],
214-
prefix + "_" + wordify(choice),
214+
f"{prefix}_{wordify(choice)}",
215215
)
216+
216217
sub_subparsers.extend(new_subparsers)
217218
sub_option_strings.extend(new_option_strings)
218219
sub_compgens.extend(new_compgens)
@@ -530,7 +531,7 @@ def recurse(parser, prefix, paths=None):
530531
format_positional(opt) for opt in subparser._get_positional_actions()
531532
if not isinstance(opt.choices, dict) if opt.help != SUPPRESS)
532533

533-
new_pref = prefix + "_" + wordify(cmd)
534+
new_pref = f"{prefix}_{wordify(cmd)}"
534535
options = all_commands[new_pref] = {
535536
"cmd": cmd, "help": (subparser.description or "").strip().split("\n")[0],
536537
"arguments": arguments, "paths": [*paths, cmd]}

0 commit comments

Comments
 (0)