mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-13 14:05:47 +00:00
sort actions
This commit is contained in:
@ -95,6 +95,11 @@ Start web service (requires additional configuration):
|
|||||||
subparser.formatter_class = _HelpFormatter
|
subparser.formatter_class = _HelpFormatter
|
||||||
subparser.set_defaults(handler=handler, parser=_parser)
|
subparser.set_defaults(handler=handler, parser=_parser)
|
||||||
|
|
||||||
|
# sort actions alphabetically in both choices and help message
|
||||||
|
# pylint: disable=protected-access
|
||||||
|
subparsers._choices_actions = sorted(subparsers._choices_actions, key=lambda action: action.dest)
|
||||||
|
subparsers.choices = dict(sorted(subparsers.choices.items()))
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user