-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Return type does not get linked if napoleon_use_rtype = True #8290
Comments
It's been 1 year. Any progress on this? And btw, @SwampFalc , in your original post, I think maybe you inverted/misplaced |
If my understanding is correct,
refs: https://www.sphinx-doc.org/ja/master/usage/extensions/napoleon.html#confval-napoleon_use_rtype I can understand it would be better if it's linked. But I feel it's a breaking change... |
That makes sense. So maybe just keep as it is now. |
@tk0miya If that's the case, maybe a simple solution is to change napoleon output to :any:`bool` rather than *bool*. |
@ain-soph @tk0miya |
@aabmets For example, how to make the return type of my method be linked? I've configured the The only solution is to make napolean generate links. But as maintainer claims, it's a breaking change and he refused to do that. |
@ain-soph
conf.py:
|
@aabmets You are using individual Return type. That works with link for sure. I'm assuming the compact case |
@tk0miya Since it's a breaking change, would you consider it in sphinx 6.0 ? |
@ain-soph In source code:
In conf.py:
|
@ain-soph |
Describe the bug
If I set
napoleon_use_rtype
toFalse
, I get a nice link to the type of the return value.However, if I change
napoleon_use_rtype
toTrue
, because I much prefer the single-line format, there is no more link. Unless I manually add backticksI find this to be wholly inconsistent with the rest of Napoleon and therefore consider it to be a bug.
To Reproduce
Steps to reproduce the behavior:
Write a basic napoleon "Returns" statement:
Set
napoleon_use_rtype
toFalse
, run sphinx-build. You get a linked but separate "Rtype" field.Set
napoleon_use_rtype
toTrue
, run sphinx-build. Thebool
type is inlined with your text, but is no longer linked.Expected behavior
Whether I want to have an inline return type, or a separated field, should have no impact on whether or not the type gets linked.
Environment info
The text was updated successfully, but these errors were encountered: