Sphinx apidocs: fix crosslink issues, polish rx.Observable #419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So finally, after much annoyance and dead ends, I think I have figured out why the cross-links in the sphinx-generated apidocs were not working
rx.core.typing
would never be linked because we weren't refering this module in any rst file.Observable
class -- this lives inrx.Observable
, and is referred to as such in e.g. the docstrings inrx/__init__.py
, but actually it has a fully qualified name ofrx.core.observable.observable.Observable
. This confuses the sphinx typehints plugin.The bad news is that this is a bit hackish (only in
docs/conf.py
, not in the main code!) but the good news is that if I read this issue correctly some future version will support what I am doing here manually:https://github.com/agronholm/sphinx-autodoc-typehints/issues/38
I've polished the
Observable
section a bit, and am planning to do the same forObservable Factory
next.