mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
sort actions
This commit is contained in:
parent
b2e0ccfd3d
commit
694aeecfa9
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user