With Sphinx for Python, how can I avoid having all method / function names sorted alphabetically in HTML? I want to keep them in the same order as in the source code.
From the sphinx.ext.autodoc documentation :
autodoc_member_orderThis value is selected if automatically documented members are sorted alphabetically (value "alphabetically"), by member type (value "groupwise"), or by source order (value "bysource"). The default value is in alphabetical order.Note that for source order, the module must be a Python module with available source code.
autodoc_member_order
This value is selected if automatically documented members are sorted alphabetically (value "alphabetically"), by member type (value "groupwise"), or by source order (value "bysource"). The default value is in alphabetical order.
Note that for source order, the module must be a Python module with available source code.
So, somewhere in your conf.py file, put:
autodoc_member_order = 'bysource'