Closed ryandvmartin closed 2 years ago
Regarding your first question: I noticed this when I was first writing the code, and at the time I couldn't figure out how to get those kinds of links to work. So I normally just do :inherited-members:
and live with the fact that everything is duplicated for each class. This is certainly not ideal, though. I can't really remember now what problems I was having, but I'll have to take a look at the attr[x].__qualname__
approach.
Regarding your second question: I don't quite understand what you're asking. Is your goal to omit methods from the superclass documentation if those methods are overridden in any subclasses?
Also, just so you know, it'll probably be a while before I have time to look into these issues myself. If you're interested in making a PR, though, I can review that pretty quickly.
I also encountered this issue, so I did some digging in the make_links
function and came up with a solution in pull request #22.
I am working in a project with selective documentation of parent methods/attributes with subclasses that variably override. This package has been invaluable for linking it all together and enabling discoverability. So many thanks in advance!
In our quest for a minimal but perfectly connected doc, we're using
include_inherited=True
on our customSection
s, but we are purposefully not using the sphinx autodoc optioninherited-members
to avoid duplicating docstrings and keeping the size down. However, the result of this combination is that the methods listed inInherited from Parent
table are no longer clickable, i.e., we cant navigate VIA the method table link to the documented method on the parent class, even though it exists in our doc.I am just wondering if there is any way to enable this automatically? I poked around in utils.py:
and swapping
x
toatts[x].__qualname__
(for thing that had such attribute) sort of got there...Another question I had was if it is possible to omit inherited methods that are overridden on the subclass? At present they look to be duplicated (perhaps this is something I need to tweak in our custom sections).
Thanks!