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 }}
Repository navigation
[Doc]: Improve animation.FuncAnimation.save - link parent methods in child's method documentation #24150
I think it would be extremely helpful to have a link to the parent's save method from animation.FuncAnimation's documentation base, as currently I don't think there is a straightforward way to find that documentation. I actually had to go to the source code of FuncAnimation, and follow up its inheritance tree to find where save was defined, then either read the docstring or find the corresponding method in the online documentation.
To extend this further - it would be helpful for all subclasses to have proper links to a parent method's documentation when the method isn't modified in the child.
changed the title [-][Doc]: Improve animation.FuncAnimation.save[/-][+][Doc]: Improve animation.FuncAnimation.save - link parent methods in child's method documentation[/+]on Oct 12, 2022
While, of course, the best solution is to get the inheritance documentation working, a simple step to partly remedy this would be to do something similar.
I see. For now, I think we should specify that FuncAnimation is a subclass of TimedAnimation, then users can follow the docs up the inheritance tree to find the documentation for inherited methods.
I can try to investigate how we can get inheritance documentation working
Activity
[-][Doc]: Improve animation.FuncAnimation.save[/-][+][Doc]: Improve animation.FuncAnimation.save - link parent methods in child's method documentation[/+]oscargus commentedon Oct 14, 2022
There is often a Bases section which shows the parent classes, but this seems to be missing from the animation classes. In TimedAnimation this has been solved by explicitly mentioning the parent class https://matplotlib.org/stable/api/_as_gen/matplotlib.animation.TimedAnimation.html
While, of course, the best solution is to get the inheritance documentation working, a simple step to partly remedy this would be to do something similar.
kwsp commentedon Oct 14, 2022
I see. For now, I think we should specify that
FuncAnimationis a subclass ofTimedAnimation, then users can follow the docs up the inheritance tree to find the documentation for inherited methods.I can try to investigate how we can get inheritance documentation working
timhoffm commentedon Oct 15, 2022
Maybe we just want to add
:inherited-members:to https://github.com/matplotlib/matplotlib/blob/main/doc/api/animation_api.rsthttps://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html