Closed ashb closed 1 year ago
I have tested this manually like so -- and changing the member-order
directive does change the output order.
.. autoapimodule:: airflow.policies
:no-members:
:members: task_policy, dag_policy, task_instance_mutation_hook, pod_mutation_hook
:member-order: bysource
~I should add tests for this.~ Done.
@AWhetter cc if you have time to take a look that would be ace.
Looks great! Thanks for the change.
@ashb Sorry it took so long to get this released. There were some test failures that had to be addressed first. This just got released in v2.0.1. Let me know if you encounter any issues.
sphinx.ext.autodoc has a
member-order:
directive, and this powers thesort_member
function[1] to sort object members for us -- by removing thesorted
call ourselves we allow the "bysource" mode to work: with thesorted
call, since we don't setself.analyzer
no extra sorting happens, so the:member-order: bysource
setting has no effect.The default sort mode for autodoc is alphabetical, so this should result in no changes to docs by default