autoprogram
autoprogram copied to clipboard
No way to avoid sorting of program's sub-commands
Sub-commands of argument parser always get sorted in the Sphinx documentation page generated with 'autoprogram'. There's no good way to turn alphabet sorting off (except maybe tricking with OrderedDict class, which breaks other functionality).
In my use case sorting of sub-commands produces misleading documentation, and I want to avoid sorting.
In autoprogram.py:
choices = sorted(choices, key=lambda pair: pair[0])
I suggest adding an option for 'autoprogram', for example: ":no_sorting:".