it seems that the tables get sorted in reverse alphabetical order on their second level and further levels aren't considered for sorting at all.
in the somewhat similar tox-dev/pyproject-fmt#241 a certain "philosophy" is mentioned and the docs describe its aim as "consistency, predictability", nothing more specific to the ordering of tables. however neither would i consider reverse sorting as a commonly predicted result, nor is the different ordering depending on the table-level consistent. if those behaviours are intended, they should be spelled out in the docs.
as reference, this would be an outcome that i would consider consistent:
when i pass a file with these tables into
pyproject-fmt
(2.2.4):these get reordered to:
it seems that the tables get sorted in reverse alphabetical order on their second level and further levels aren't considered for sorting at all.
in the somewhat similar tox-dev/pyproject-fmt#241 a certain "philosophy" is mentioned and the docs describe its aim as "consistency, predictability", nothing more specific to the ordering of tables. however neither would i consider reverse sorting as a commonly predicted result, nor is the different ordering depending on the table-level consistent. if those behaviours are intended, they should be spelled out in the docs.
as reference, this would be an outcome that i would consider consistent: