Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to avoid sorting of program's sub-commands #68

Open
denis-postanogov opened this issue Jan 18, 2024 · 0 comments
Open

No way to avoid sorting of program's sub-commands #68

denis-postanogov opened this issue Jan 18, 2024 · 0 comments

Comments

@denis-postanogov
Copy link

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:".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant