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
Indeed inherited members are not picked up by pytkdocs right now. I wonder if we should pick them up by default and let the users filter the members, or if we should add another option like Sphinx's inherited-members.
Thanks for the quick answer! Maybe it's good to have the extra flexibility of inherited-members to be able to apply separate filters on them (and show all without leading _ by default)? Either way, this would be a highly useful feature.
So you're suggesting to simply copy the members configuration option as inherited_members, and make it accept the same possible values (true, false, or a list of names)?
Alright. I just released pytkdocs version 0.5.0. mkdocstrings does not yet accept it. I'll increase the version range soon. You will then be able to add a inherited_members: true to the selection options. The option only accepts a boolean, not a list of members, nor a list of filters: I wanted to do a simple pass first. If you all really need the ability to select or filter inherited members differently than direct members, we will open a new feature request.
Reacted by Tristan Zajonc, Ofek Lev, jan-matthis, Cristian Garcia and David Torres Ocaña
Yes, I'd consider the current behavior a bug. Could you open a new issue? Just a sentence and a link to your previous comment will do :) It's hard to keep track of things in comments.
Hi @pawamoy, I am rather new to mkdocs / mkdocstrings and a bit confused on this issue. Like the thread opener, I want my doc strings to be repeated for the child classes / mehtods if not specified otherwise. I can do this with sphinx, but would much rather use mkdoc.
So far, I tried this configuration in my mkdocs.yml
Activity
pawamoy commentedon Apr 9, 2020
Indeed inherited members are not picked up by
pytkdocsright now. I wonder if we should pick them up by default and let the users filter the members, or if we should add another option like Sphinx'sinherited-members.jan-matthis commentedon Apr 9, 2020
Thanks for the quick answer! Maybe it's good to have the extra flexibility of
inherited-membersto be able to apply separate filters on them (and show all without leading_by default)? Either way, this would be a highly useful feature.pawamoy commentedon Apr 9, 2020
So you're suggesting to simply copy the
membersconfiguration option asinherited_members, and make it accept the same possible values (true, false, or a list of names)?jan-matthis commentedon Apr 9, 2020
Yes, that's what I was thinking of
pawamoy commentedon Apr 9, 2020
OK, it should be fairly easy to implement then. I'll open the corresponding feature request on
pytkdocs.pawamoy commentedon Jun 8, 2020
Alright. I just released pytkdocs version 0.5.0. mkdocstrings does not yet accept it. I'll increase the version range soon. You will then be able to add a
inherited_members: trueto theselectionoptions. The option only accepts a boolean, not a list of members, nor a list of filters: I wanted to do a simple pass first. If you all really need the ability to select or filter inherited members differently than direct members, we will open a new feature request.ofek commentedon Jun 8, 2020
Hmm, mkdocstrings/pytkdocs#43
edit: fixed
pawamoy commentedon Jun 9, 2020
Closing! Open new issues if other problems arise 🙂
cgarciae commentedon Jul 8, 2020
Hey, I am not able to inherit documentation for
__init__, is there are restriction regarding this method?pawamoy commentedon Jul 10, 2020
Oh, yeah, it happens here: https://github.com/pawamoy/pytkdocs/blob/master/src/pytkdocs/loader.py#L587-L600. I think we could safely remove this since we can now chose to inherit or not.
cgarciae commentedon Jul 27, 2020
@pawamoy being able to inherit the docs of the
__init__method would save me a lot of work. Is this a planed feature?cgarciae commentedon Jul 27, 2020
I think for the same reason, I also cant get the documentation for inherited class methods right now.
pawamoy commentedon Jul 27, 2020
Yes, I'd consider the current behavior a bug. Could you open a new issue? Just a sentence and a link to your previous comment will do :) It's hard to keep track of things in comments.
Also, a PR is welcome, I'm too busy these days :/
Thanks!
samsja commentedon Mar 17, 2023
I cannot make this work 😕 can someone explain how the
index.mdshould look like for it to work ? Thanks in advance 🙌famura commentedon Apr 17, 2023
Hi @pawamoy, I am rather new to mkdocs / mkdocstrings and a bit confused on this issue. Like the thread opener, I want my doc strings to be repeated for the child classes / mehtods if not specified otherwise. I can do this with sphinx, but would much rather use mkdoc.
So far, I tried this configuration in my
mkdocs.ymlHowever, this had no effect. I've just read that this feature is not implemented (yet). Does that mean I have to look for a workaround now?
Best whishes and many thanks!
pawamoy commentedon Apr 17, 2023
Hey @famura, yes indeed, this is not yet implemented. If you find a workaround let us know 🙂
famura commentedon Apr 17, 2023
OK, thank you for your super quick response