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

Class methods' full source path is shown instead of the identifier used for it #111

Closed
ianspektor opened this issue Oct 26, 2023 · 4 comments

Comments

@ianspektor
Copy link

Describe the bug

Hey! Thank you very much for the work on #90 and #91 :)

91 does seem fixed, but 90 doesn't. Upgraded mkdocstrings-python to 1.5.3 and griffe to 0.36.8 (see PR) and I'm still seeing the object's full path (temporian.implementation.numpy.data.event_set.EventSet.begin) instead of the identifier I used for it (::: temporian.EventSet.begin) in the header (see the rendered doc here). Note that I import the EventSet class in my root __init__ which makes the identifier work.

Full explanation in the original issue.

To Reproduce
See #90

Expected behavior
See #90

Thanks in advance for any help!

@pawamoy
Copy link
Member

pawamoy commented Oct 26, 2023

Hmm, weird, I expose objects from submodules in my root init module too, and they correctly keep their alias path in the docs, for example: https://mkdocstrings.github.io/griffe/reference/griffe/#griffe.Attribute.

I'll check out your repo again 🙂

@pawamoy
Copy link
Member

pawamoy commented Oct 26, 2023

Actually I'm able to replicate. It works fine when I let mkdocstrings unfold members of griffe or griffe.Attribute, but if I inject griffe.Attribute.functions directly, the path is the canonical one.

@ianspektor
Copy link
Author

Great to hear! Let me know if there's anything you need from my side

pawamoy added a commit to mkdocstrings/griffe that referenced this issue Oct 26, 2023
Previous accessing an alias member with the `[]` syntax
would access the member on the target,
instead of re-aliasing the member (to maintain alias path).

Issue mkdocstrings-python#111: mkdocstrings/python#111
@pawamoy
Copy link
Member

pawamoy commented Oct 26, 2023

Pushed a fix, will release soon 🙂

@pawamoy pawamoy closed this as completed Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants