Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherited menber #138

Closed
samsja opened this issue Mar 21, 2023 · 7 comments · Fixed by #170
Closed

Inherited menber #138

samsja opened this issue Mar 21, 2023 · 7 comments · Fixed by #170
Labels
feature New feature or request

Comments

@samsja
Copy link

samsja commented Mar 21, 2023

Context

Hey, first thanks for the great tools!

I commented recently on this issue in pytkdocs.

My end goal is to make work the inherited_members of mkdocstring work.

I was about to create a PR for pytkdocs but I saw that the new python handler of mkdostring is using griffe.

So I was wondering :

  • is ìnherited_menbers` or something similar is implemented on griffe ?
  • If no, I will try to draft a PR to fix it (as I really need to be able to show inherited method for my project), where should I start ?

Thanks in advance

@samsja samsja added the feature New feature or request label Mar 21, 2023
@pawamoy
Copy link
Member

pawamoy commented Mar 21, 2023

Hello! Thanks for your help!

Erm, I had started working on it but can't find my local branch anymore... probably on another computer. Will let you know 🙂

@samsja
Copy link
Author

samsja commented Mar 22, 2023

Great then !

@pawamoy
Copy link
Member

pawamoy commented Jun 15, 2023

So, I never found the branch I was talking about, hahaha... 💀
It contained only one or two functions, so it's fine, I'll just start again. Let me gather my thoughts again, and I'll report back, so that you can help, if needed and if you're still willing to 🙂

@samsja
Copy link
Author

samsja commented Jun 15, 2023

I would be happy to do this PR. I found a hack on my side which is why I did not spend much time on this for now

@pawamoy pawamoy mentioned this issue Jun 15, 2023
7 tasks
@pawamoy
Copy link
Member

pawamoy commented Jun 25, 2023

Quick question: how would you then render inherited members in your docs?

Like this?

::: path.to.my.Class
    options:
      inherited_members: true

Or would you like to reference specific inherited members, like this?

::: path.to.my.Class.inherited_method

@samsja
Copy link
Author

samsja commented Jul 3, 2023

sorry I did not had time to answer. The first one seems more natural to me. But both looks fine honestly

@pawamoy
Copy link
Member

pawamoy commented Jul 3, 2023

Thanks! Yeah I've made it work in both cases anyway 🙂
It was pretty much guaranteed that users would want to access inherited members this way (second snippet).
It was a bit hard to pull off, but I managed to do that in a clean way 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants