You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 20, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 20, 2026. It is now read-only.
pytkdocs should re-order the root object children using the given members order.
For this we'll need to stop casting members as a set, and keep it as a list.
Before returning the root object, we'll then need to re-order them.
Let's make it the default, not configurable behavior (sorting is more a rendering issue, we shouldn't implement rendering configuration in pytkdocs)
Describe alternatives you've considered
It's easier to do it in pytkdocs than re-sorting in mkdocstrings: the renderer and collector options are separated, it would be messy to use the collector options in the renderer, and I don't want to duplicate the members option in the renderer (nor users want to copy/paste it).
Reacted by jan-matthis, Michael Deistler, Ofek Lev, Hadrien Mary, hudurand, Tariq Hassan, Pierre Guilmin, Kasper Malfroid and Clinton Boys
No 😕
PRs welcome. I'm currently reducing the number of open issues to keep the ones we could still implement/fix in pytkdocs (which will be replaced by a more robust tool).
@pawamoy Hmm, I see your preferred solution but wouldn't it make more sense to have the renderer read the members and act accordingly? Especially since the renderer has since added a new sorting option mkdocstrings/mkdocstrings#274
have the renderer read the members and act accordingly
Unfortunately that is not possible, because mkdocstrings passes the selection options only to the collector, not the renderer. I wouldn't be against a refactor that removes the distinction between these two options groups (no more selection/rendering keys, no more base renderer / base collector classes, just a base handler one that receives all options). Up to the discussion of course.
I'll try to come up with a workaround in the next few days (keeping that issue in my saved notifications).
Also note that I've been working on a new "collector" which might alleviate this issue. I'll try to move forward on this in the next few days as well.
If there are still users of pytkdocs who are interested in this, please let us know what is preventing you from migrating to the new handler (using Griffe instead of pytkdocs)! Closing for now.
Activity
ofek commentedon Jan 25, 2021
Hello again! Has this been fixed/implemented?
pawamoy commentedon Sep 21, 2021
8 months later...
No 😕
PRs welcome. I'm currently reducing the number of open issues to keep the ones we could still implement/fix in pytkdocs (which will be replaced by a more robust tool).
ofek commentedon Nov 24, 2021
@pawamoy Hmm, I see your preferred solution but wouldn't it make more sense to have the renderer read the members and act accordingly? Especially since the renderer has since added a new sorting option mkdocstrings/mkdocstrings#274
pawamoy commentedon Dec 14, 2021
@ofek sorry for the late reply 🙇
Unfortunately that is not possible, because mkdocstrings passes the selection options only to the collector, not the renderer. I wouldn't be against a refactor that removes the distinction between these two options groups (no more selection/rendering keys, no more base renderer / base collector classes, just a base handler one that receives all options). Up to the discussion of course.
I'll try to come up with a workaround in the next few days (keeping that issue in my saved notifications).
Also note that I've been working on a new "collector" which might alleviate this issue. I'll try to move forward on this in the next few days as well.
pawamoy commentedon May 28, 2022
This should now be fixed (finally 🥵!), at least with the new Python handler.
pawamoy commentedon May 28, 2022
Ah, but we're in the pytkdocs repo here 🤦
So it's not fixed. But it can now be fixed. Reopening.
pawamoy commentedon Oct 24, 2024
If there are still users of pytkdocs who are interested in this, please let us know what is preventing you from migrating to the new handler (using Griffe instead of pytkdocs)! Closing for now.