Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upInheritance across modules doesn't work #135
Comments
This comment has been minimized.
This comment has been minimized.
|
pdoc supports cross-module linking by generating stable identifiers and then relying on the pdoc http server to resolve them based on which modules are loaded into memory. Links are generated in templates and then resolving the links is in the server. I don't know why this isn't already working, so you'll need to investigate. There may be dragons lurking. |
This comment has been minimized.
This comment has been minimized.
|
I wanted to generate a static documentation, so I'm using |
This comment has been minimized.
This comment has been minimized.
|
@Kobzol Sadly, you're shit-out-of-luck. :-) Cross linking isn't supported in the static mode. It's just not a problem I ever tried to solve. |
This comment has been minimized.
This comment has been minimized.
|
I looked at how the modules are constructed and it would require a substantial rewrite to support this, I probably won't be going into that now. Feel free to merge my commit if you think that the inherited method hiding functionality is useful. Thanks for a quick answer :-) |
Kobzol commentedJul 26, 2017
•
edited
Hello :-) Pdoc correctly shows inheritance links and copies inherited docstrings for methods in a single module, but when I have classes inherited across modules, it doesn't work.
E.g.:
With this there will be no inheritance link and no inherited docstring. The inheritance chain will be displayed but it won't be clickable.
Is there a way to accomplish this? I'd make a PR if you'd point me in the direction how this could be achieved.
My original motivation was to hide inherited methods that are not overridden, because for classes with many methods they are needlessly displayed in the derived classes and it produces visual clutter.
I added it to pdoc (Kobzol@53dfee9) but then I realized that pdoc already handles inheritance and if it worked across modules it would be much easier and less hacky to do this.