With Sphinx for Python how is it possible to avoid having all the method/function names sorted alphabetically in HTML? I want to keep them in the very same order as they are found in the source code.
From the sphinx.ext.autodoc documentation:
autodoc_member_order
This value selects if automatically documented members are sorted alphabetical (value 'alphabetical'), by member type (value 'groupwise') or by source order (value 'bysource'). The default is alphabetical.
Note that for source order, the module must be a Python module with the source code available.
So somewhere in your conf.py file, put:
autodoc_member_order = 'bysource'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With