Skip to content

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

Open
@denis-postanogov

Description

@denis-postanogov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions